Hey, I have a code, that works in all modern browsers, but not in IE 6,7.
$('.cat1').toggle(function() {
$(this).parent('li').next('ul').slideUp();
$(this).css('background-position', '0px 0px');
return false;
}, function() {
$(this).parent('li').next('ul').slideDown();
$(this).css('background-position', '-210px 0px');
return false;
});
It does the background-position change, but not the slideUp or slideDown, any idea why?
I thought it's because of the $(this), but I'm not sure, and if yes, is there a way to make it work?
Edit: Seems the problem might be in the 'next()' function.