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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:35:01+00:00 2026-05-11T21:35:01+00:00

Here is my html source code: <ul id=accordion> <li><h3><a id=1></a></h3></li> <li><h3><a id=2></a></h3></li> <li><h3><a id=3></a></h3></li>

  • 0

Here is my html source code:

<ul id="accordion">
 <li><h3><a id="1"></a></h3></li>
 <li><h3><a id="2"></a></h3></li>
 <li><h3><a id="3"></a></h3></li>
</ul>

and javascript

<script type="text/javascript">
 $(document).ready(function(){
  $('#accordion li h3').click(function(){
   //I want to alert the id attribute of a, but i don't know why
   //I tried $(this+'a') or $('#accordion li h3:selected a') but it failed.
  });
 });
</script>
  • 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-11T21:35:01+00:00Added an answer on May 11, 2026 at 9:35 pm

    try

    alert($(this).children('a').attr('id'))

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

Sidebar

Related Questions

Here is the whole source code: http://zerioh.tripod.com/ressources/sockets.html Here is the code I want to
I generate a PDF from html source code. I read all the text line
I have html source code which I want to filter out one or more
I was advised to look here: http://exampledepot.com/egs/javax.crypto/DesFile.html for the source code of encryption/decryption using
I have downloaded the Android source code by following the steps given here http://source.android.com/source/downloading.html
I'm following the example code here: http://cekirdek.pardus.org.tr/~ismail/ffmpeg-docs/output-example_8c-source.html My code is as follows: fmt =
Suppose we have this example: http://techdroid.kbeanie.com/2009/07/custom-listview-for-android.html with source code available here: http://code.google.com/p/myandroidwidgets/source/browse/trunk/Phonebook/src/com/abeanie/ How can
I am trying to follow Trees tutorial at: http://cslibrary.stanford.edu/110/BinaryTrees.html Here is the code I
(NOTE: Source code here https://github.com/cthielen/dss-evote ) I've got a simple voting application. A survey
I downloaded the source code for an applet from here: http://www.oxygenxml.com/demo/AuthorDemoApplet/author-component-dita.html As instructed, I've

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.