I have the following piece of code, I need to show or hide the panels. My question is, the show() works on alternative clicks only.
var allPanels = $(".panel");
allPanels.hide(2000);
allPanels.show();
I would like to know the reason why show() does not work consistently.
allPanels.hide(2000, function() { $(this).show() });