I’m trying to allow users to click on the [+] trigger and have it’s sibling div open and close to display that topic’s information.
Why can’t this find the sibling?
$('.moreInfo').hide();
$('a.triggerButton').click(function(){
var $this = $('a.triggerButton');
$this.find().siblings('.moreInfo').slideToggle('fast');
});
I made a fiddle here. Thanks for your help.
Because firstly you should address
thisanchor element, and secondly get rid of useless.find():DEMO: http://jsfiddle.net/JFw9g/9/