What I'm trying to do is when someone clicks on a h4 heading the next
one has a class (top) added to it. In between each heading there are
other elements. The h4s are inside a div called 'faq'.
So far I've tried:
jQuery('div.faq h4').click(function() {
jQuery(this).next().addClass('top');
});
And:
jQuery('div.faq h4').click(function() {
jQuery(this).next('h4').addClass('top');
});
Neither works and I can't figure out why? If anyone could help, that
would be great!
(I'm using jQuery instead of $ because I'm using Prototype as well)