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
(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
2 matches
Mail list logo