...

View Full Version : when click itself why it doesn't hide?



runeveryday
07-14-2011, 03:40 PM
http://www.codingcereal.com/2010/12/jquery-simple-tab-switcher/

when i change the js code to this:
Code:

j
Query(document).ready(function() {
jQuery("#tabswitch ul li:first").addClass("active");
jQuery("#tabswitch div.tab-container:first").show();

jQuery("#tabswitch ul li").click(function(){
jQuery("#tabswitch div.tab-container").hide();
jQuery("#tabswitch ul li").removeClass("active");

});
})

for the default state. the tab1 is show, but why when i click the tab1. it doesn't hide?. but there is a line in the click function. jQuery("#tabswitch div.tab-container").hide();

could it be that this line doesn't effect on it? jQuery("#tabswitch div.tab-container").hide();



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum