Hi,
I know how to show/hide, or fadeIn/out in jquery, but is there a built in way to toggle between show/hide or fadein/out or do I have first look if the element is display:none, if yes then show otherwise hide?
Hi,
I know how to show/hide, or fadeIn/out in jquery, but is there a built in way to toggle between show/hide or fadein/out or do I have first look if the element is display:none, if yes then show otherwise hide?
$(element).toggle()
Toggle displaying each of the set of matched elements. If they are shown, toggle makes them hidden (using the hide method). If they are hidden, toggle makes them shown (using the show method).
Check out the cycle plugin, it's great. Might not be exactly what you're looking for but it has some very nice features.