Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8003913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:46:44+00:00 2026-06-04T16:46:44+00:00

i have an <ul> that looks like this <ul class=class_1 class_2> <li class=class1> <div

  • 0

i have an <ul> that looks like this

<ul class="class_1 class_2">
    <li class="class1">
        <div class="submission_list_item">
            <div class="sub_list_item_content modal_link" href="url here">
                <div class="facebook_user" style="display:none;"></div>
                <div class="submission_response ">
                    <label></label>
                    <span class="MediaUploadResponse"><img alt="Sample_mpeg4" src="url here"></span> </div>
                <div class="submission_response name">
                    <label>NAME:</label>
                    <span class="Response"></span> </div>
                <div class="submission_response last_name">
                    <label>LAST NAME</label>
                    <span class="Response"></span> </div>
                <div class="submission_response description">
                    <label>DESCRIPTION:</label>
                    <span class="Response"> Test </span> </div>
                <div class="submission_response video_title">
                    <label>VIDEO TITLE:</label>
                    <span class="Response"> Video </span> </div>
            </div>
        </div>
    </li>
    <li class="class1">
        <div class="submission_list_item">
            <div class="sub_list_item_content modal_link" href="url here">
                <div class="facebook_user" style="display:none;"></div>
                <div class="submission_response ">
                    <label></label>
                    <span class="MediaUploadResponse"><img alt="Sample_mpeg4" src="url here"></span> </div>
                <div class="submission_response name">
                    <label>NAME:</label>
                    <span class="Response"></span> </div>
                <div class="submission_response last_name">
                    <label>LAST NAME</label>
                    <span class="Response"></span> </div>
                <div class="submission_response description">
                    <label>DESCRIPTION:</label>
                    <span class="Response"> Test </span> </div>
                <div class="submission_response video_title">
                    <label>VIDEO TITLE:</label>
                    <span class="Response"> Video </span> </div>
            </div>
        </div>
    </li>
</ul>

What i am trying to do is to swap the order of the 2 divs, name with title in every < li> item that is on my page. Tried .each on the < li>s but no luck. Any idea how to do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T16:46:45+00:00Added an answer on June 4, 2026 at 4:46 pm

    I think you need something like this:

    $('ul.class_1 li.class1').each(function() {
      var name = $(this).find('div.name');
      var video_title = $(this).find('div.video_title');
      name.insertAfter($('div.description', this));
      video_title.insertBefore($('div.last_name', this));
    });
    

    DEMO

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a code that looks like this: <div id=wrapper> <img id=first class=images src=img/nike.jpg
I have html that looks something like this: <div> <table> <tr onclick=show();> <td class=cell>Click
I have code that looks like this: class T {}; class container { const
Assume I have a class that looks like this: class Sample { public string
I have a form that looks like this: class SampleForm(forms.Form): text = forms.CharField(max_length=100) In
I have a model that looks like this: class Invite(models.Model): user = models.ForeignKey(User) event
I have a Handler class that looks like this: class Handler{ public $group; public
Currently I have a class that looks like this: public class MyClass : IMyClass
I have a Rack application that looks like this: class Foo def initialize(app) @app
I have a class that looks like this: public class BasePadWI { public WorkItem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.