When click itself why it doesn't hide in jquery?

jQuery Simple Tab Switcher | CodingCereal

when i change the js code to this:

jQuery(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();

It seems to work for me. Is there some other problem with the page that is causing interference?
A test page that demonstrates the problem is the best way for us to find that out.