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 7938443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:48:52+00:00 2026-06-03T22:48:52+00:00

I have two list. An unordered list and a set of divs which are

  • 0

I have two list. An unordered list and a set of divs which are acting as a list. The unordered list has 4 list items and there are also 4 divs.

What I am trying to achieve is to copy the heading from each div and place it in each list item. In order words the heading of first div should correspond to that of the first list-item.

All i have been able to achieve thus far, is to loop through the divs and alert the heading which i want to copy as shown below but i am not sure how to proceed.

<div class="container">
    <div class="nav-list">
        <ul>
            <li>1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
        </ul>
     </div>
    <div class="tab-list">
        <div class="tab-item">
            <h3>To be copied</h3>
        </div>
        <div class="tab-item">
            <h3>To be copied</h3>
        </div>
        <div class="tab-item">
            <h3>To be copied</h3>
        </div>
        <div class="tab-item">
            <h3>To be copied</h3>
        </div>
    </div>
</div>


$('.tab-list .tab-item').each(function(index) {
    alert(index + ': ' + $(this).children('h3').text());
});
  • 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-03T22:48:54+00:00Added an answer on June 3, 2026 at 10:48 pm

    try this:

    $('.tab-list .tab-item').each(function(index) {
        $('.nav-list').children('ul').children().eq(index).html($(this).children('h3').text());
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Python has a very nice 'set' data structure which is basically an unordered list
I have an unordered list with a background-image set. All list-items have the same
I have this unordered list <ul> <li>two</li> <li>three</li> </ul> Is there a way I
I have two list: set lista {5 6} set listb {8 9} and the
At the moment I have two (maybe more) unordered lists which are sortable with
I have an unordered list with different bullet images and i'm trying to align
Basically I have an unordered list acting as my navigation on a one page
I have a unordered list, with each list element containing two spans (say span
I have two things. have my last list item absolute bottom of my unordered
I have two divs sr-left-checks and sr-right-checks. they both contain unordered lists. The left

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.