ElEditors, Interface administrators, Administrators
85,546
edits
mNo edit summary |
mNo edit summary |
||
Line 11: | Line 11: | ||
addOnloadHook(function(){ | addOnloadHook(function(){ | ||
$('div.tabdiv > ul > li').click(function(){ | $('div.tabdiv > ul > li').each(function(){ | ||
var a = $(this).find('> a:first'), href = a.attr('href'); | |||
$(a).attr('href', ''); | |||
$(this).click(function(){ | |||
$(this).parent().find('> li').removeClass('active').addClass('inactive'); | |||
$(this).removeClass('inactive').addClass('active'); | |||
$(this).parent().parent().find('> div').hide(); | |||
}) | $(href).show(); | ||
}); | |||
}); | |||
$('div.tabdiv > ul > li:first').click(); | $('div.tabdiv > ul > li:first').click(); | ||
}); | }); |