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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:51:02+00:00 2026-05-29T11:51:02+00:00

When an anchor tag is clicked, anotherDiv is made visible. Using jQuery, I want

  • 0

When an anchor tag is clicked, “anotherDiv” is made visible.

Using jQuery, I want to be able to fetch the description within each li onClick of the anchor tag and insert it into the “anotherDiv” area which is also visible onClick of an anchor tag. The description text is initially set to display none.

<style>
    .desc{
     display:none;
    }

    #anotherDiv{
       display: none;
    }

</style>

        <li style="overflow: hidden; float: none; width: 158px; height: 125px;">
                    <a onClick="return addPlayer(952541791001, 661361792001, 600, 320)" id="no8" class="video-pop">
                        <img width="132" height="75" alt="" src="image.jpg">
                    </a>
                    <div class="label">The label goes here......</div>
                    <div class="desc">The description goes here.....</div>
                </li>
      <li style="overflow: hidden; float: none; width: 158px; height: 125px;">
                    <a onClick="return addPlayer(952541791001, 661361792001, 600, 320)" id="no10" class="video-pop">
                        <img width="132" height="75" alt="" src="image.jpg">
                    </a>
                    <div class="label">The label goes here......</div>
                    <div class="desc">The description goes here.....</div>
                </li>
    -------------------------------------------------------------
    <div id="anotherDiv"></div>
  • 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-05-29T11:51:04+00:00Added an answer on May 29, 2026 at 11:51 am

    Try this:
    http://jsfiddle.net/MZga6/

    $('a').bind('click.myClick', function() {
        var that = $(this);
      $('#anotherDiv').text(that.parent().find('.desc').text()).show();
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to toggle HTML text of an anchor tag using jQuery? I want an
I have an anchor tag <a class=next>next</a> made into a button. Sometimes, this tag
I am trying to assign the onclick event to an anchor tag that already
I have two images with which I am using in an anchor tag. I
Can we Made an anchor tag autoclick in the success function of Ajax Script?
I am creating my content dynamically, When a anchor tag is clicked navigate() function
I have a jquery which has a click event, when any anchor tag is
I have a problem i need a jquery code to find which anchor tag-edit
I'm working with jquery. I have an anchor tag that is generated dynamically in
I want to author an anchor tag that executes some JavaScript and then proceeds

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.