Reputation:
How can I get the adjacent sibling of a dynamic selector?
This is what I have but it is not working.
var titles = $('a.highlight');
titles.click(function(){
$(this + " + object.hidden").show("slow");
return false;
}
);
Upvotes: 0
Views: 479
Reputation: 5820
var titles = $('a.highlight');
titles.click(function(){
$(this).siblings('.hidden').show("slow");
return false;
});
Upvotes: 1