Tabs Jquery not working IE

Discussion in 'jQuery' started by qdungeng, Jan 4, 2013.

  1. #1
    Dear friend
    Please help me with Tabs Jquery not working on IE.
    
    <script type="text/javascript">
        $(document).ready(function() {
    	//When page loads...
    	$(".tab_content").hide(); //Hide all content
    	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
    	$(".tab_content:first").show(); //Show first tab content
        //hide tab2
        $(".tabcontent").hide(); //Hide all content
    	$("ul.vntabs li:first").addClass("active").show(); //Activate first tab
    	$(".tabcontent:first").show(); //Show first tab content
    	});
        //hide tab3
        $(".vmtab_content").hide(); //Hide all content
    	$("ul.vmtabs li:first").addClass("active").show(); //Activate first tab
    	$(".vmtab_content:first").show(); //Show first tab content
    	//hide tab4
        $(".vmtab_content2").hide(); //Hide all content
    	$("ul.vmtabs2 li:first").addClass("active").show(); //Activate first tab
    	$("ul.vmtabs3 li:first").addClass("active").show();
    	$(".vmtab_content2:first").show(); //Show first tab content
    	//On Click Event
    	$("ul.tabs li").click(function() {
    
    		$("ul.tabs li").removeClass("active"); //Remove any "active" class
    		$(this).addClass("active"); //Add "active" class to selected tab
    		$(".tab_content").hide(); //Hide all tab content
    
    		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
    		$(activeTab).fadeIn(); //Fade in the active ID content
    		return false;
        });
        //onclick tab2
        $("ul.vntabs li").click(function() {
    		$("ul.vntabs li").removeClass("active"); //Remove any "active" class
    		$(this).addClass("active"); //Add "active" class to selected tab
    		$(".tabcontent").hide(); //Hide all tab content
    		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
    		$(activeTab).fadeIn(); //Fade in the active ID content
            return false;
        });
        $("ul.vmtabs li").click(function() {
    
    		$("ul.vmtabs li").removeClass("active"); //Remove any "active" class
    		$(this).addClass("active"); //Add "active" class to selected tab
    		$(".vmtab_content").hide(); //Hide all tab content
    
    		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
    		$(activeTab).fadeIn(); //Fade in the active ID content
    		return false;
    
        });
    	$("ul.vmtabs2 li").click(function() {
    
    		$("ul.vmtabs2 li").removeClass("active"); //Remove any "active" class
    		$(this).addClass("active"); //Add "active" class to selected tab
    		$(".vmtab_content2").hide(); //Hide all tab content
    
    		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
    		$(activeTab).fadeIn(); //Fade in the active ID content
    		return false;
    
        });
    	$("ul.vmtabs3 li").click(function() {
    
    		$("ul.vmtabs3 li").removeClass("active"); //Remove any "active" class
    		$(this).addClass("active"); //Add "active" class to selected tab
    		$(".vmtab_content2").hide(); //Hide all tab content
    
    		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
    		$(activeTab).fadeIn(); //Fade in the active ID content
    		return false;
    
        });
        $(".menu-item-home .sub-menu").attr('style','display:block');
    
    </script>
    
    Code (markup):
    Website demo : vietnam-cambodiatravel(.)com

    Thanks a lot
     
    qdungeng, Jan 4, 2013 IP
  2. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #2
    It seems to be working fine in IE9. What problems are you having?
     
    Rukbat, Jan 5, 2013 IP