Search Results

Search found 1 results on 1 pages for 'user2956944'.

Page 1/1 | 1 

  • jQuery and first element in the clicked element

    - by user2956944
    i have 2 div elements, and if i click on the first div then should the other div which is inside of the clicked div displayed, but i can't understand who it works, my jquery code is so: jQuery('.infobutton').click(function(){ var clickedID = jQuery(this).attr('id'); jQuery(clickedID).children('div').toggle(); }); <div class="infobutton" id="infobtn1"> <div class="content">some content</div> </div> I get everytime right id, i tried also with .first(), .parent(), .children('.content') It's possible to do this with jQuery?

    Read the article

1