[jQuery] Re: show hide div with menu

2007-09-10 Thread Wizzud
1. tabContent2 : holds the collection of DIVs that are immediate children of #tabcontent 2. filter(':visible') : reduces the collection from (1) to just those DIVs that are visible (ie probably the one that had previously had show() run on it) because it is not necessary to hide those that alread

[jQuery] Re: show hide div with menu

2007-09-10 Thread Wizzud
(NB : You have multiple instances of id='sidemenu', which is not recommended.) Using the tab-2 stuff as an example... //saves repeatedly fetching them inside the handler, assuming they are static!... var tabContent2 = $('#tabcontent > div'); $('#tab-2 li a').each(function(n){ $(this).click(f