나는 다음과 같은 오류 얻을 :jQuery를 IE8 숨기기() 함수에 오류
jquery1.4.2.js
Line: 2828
Error: The Object does not support the method.
내 자바 스크립트 코드 : 파이어 폭스에
$(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
//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;
});
});
그것이해야처럼 작동합니다!
도움 주셔서 감사합니다.
아마도 조금 더 코드를 포맷 해보십시오. – ScottE
코드에서 오류를 일으키는 줄은 무엇입니까? – Tomalak
IE8 툴바는 $ (". tab_content")를 가리 킵니다. hide(); – phx