Sliding not working
Sliding not working
Alright, not sure why this isn't working. It is super basic code and I don't mind that it is rough.
- $('h2').next().hide();
$('h2').click(function(){
if($('h2').next().css('display') == 'none') {
$(this).next().slideDown();
}
else {
$(this).next().slideUp();
}
});
I have also tried:
- $('h2').next().hide();
$('h2').click(function(){
if($('h2').next().css('display') == 'none') {
$(this).next().slideDown();
}
else if($('h2').next().css('display') == 'block' {
$(this).next().slideUp();
}
});
the .next() refers to a div. I want this to work across mutiple pages, and I don't want to put in id's for each page. This client is a pain and I just want them off my back haha, here is the site if you want to see it in action, it's still a WIP
http://www.wecreatetv.com/website/index.shtml?1
DO NOT SHARE LINK please