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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:10:34+00:00 2026-05-30T19:10:34+00:00

i have a problem and I can’t understand what is happening. I’m dealing with

  • 0

i have a problem and I can’t understand what is happening.
I’m dealing with this problem for a few hours.

I’m trying to get the text from some DIVs after the li is clicked.

Here is the html of the ul list and the li:

<ul id="thumbsUL" runat="server" class="thumbs noscript">
    <li>
        <a class="thumb" name="leaf" href="http://farm4.static.flickr.com/3261/2538183196_8baf9a8015.jpg" title="Title #0">
           <img src="http://farm4.static.flickr.com/3261/2538183196_8baf9a8015_s.jpg" alt="Title #0" />
        </a>
        <div class="caption">
            <div class="image-title">Title #0</div>
            <div class="image-desc">Description</div>
        </div>
    </li>
</ul>

here is the script (one of the most i’ve tried):

$("#thumbsUL li").click(function () {
    var title = $(this).children(".caption").children(".image-title").text();
    alert(title);
});

the alert fire but without the text of the image title text.

1.what am i doing worng?

2.is there a better way then this to get the children?

3.is $(".selector").text() is the best way to get the content of the element 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-05-30T19:10:36+00:00Added an answer on May 30, 2026 at 7:10 pm

    try this,

    $("#thumbsUL li").click(function () {
        var title = $(this).find(".image-title").html();
        alert(title);    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem: how can I delete a line from a text file
I have a problem - i can't compile SqlCipher. I'm using this http://groups.google.com/group/sqlcipher/browse_thread/thread/55c6296b56bf4533/c792bbec6df7d4f4?tvc=2#c792bbec6df7d4f4 instructions
I have a problem that I can't resolve. Let's say I have this map
hello today i have a problem how can this happen ? everything that is
I seem to have a problem and can't get it work. I'm working on
I have some problem with PostSharp (I assume that problem can be solved by
I have a problem i can't get my head around. I use a sphere,
following up on this question , I now have another problem - how can
I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE
i have this problem: user can add an HTML description and it will be

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.