javascript - How can I target a specific link/click in jQuery? -
http://jsfiddle.net/kevinorin/khhdt/
after clicking open 1 of black bars/accordions (example: "greenhouse gases") have link "more/less info" suppose toggle more information. problem click function not on "more/less info" element entire "."happening-main-text" element. clicking anywhere in div activates toggle , shouldn't be. ideas how modify jquery target .readmore in div?
// more/less info why is happening jquery('.readmore').closest(".happening-main-text").click(function() { jquery(this).children(".divmore").toggle('slow'); return false; });
use
jquery('.readmore').click(function() { jquery(this).closest(".happening-main-text").children(".divmore").toggle('slow'); return false; });
what did precisely binding event enclosing ".happening-main-text"
element.
Comments
Post a Comment