문서에로드 할 수있는 두 가지 함수가 있습니다. 그들은 개별적으로 실행할 때 잘 작동합니다. 하지만 두 함수가 같은 문서에서 호출되면 js가 준비됩니다. 그 중 하나 (두 번째)는 작동하지 않습니다. 도와주세요. 파일은 다음 주소에서 설정됩니다. http://jsfiddle.net/rexonms/FXPhu/15/jQuery 함수가 다른 함수와 작동하지 않습니다.
기본 코드는 다음과 같이 문서 준비에서 호출됩니다. 그리고 jQuery를 1.2.6를 호출 -이 폐쇄 CMS 그리고 내가 jQuery를 버전을 변경할 수 없습니다 : hover
에
// Sidebar Accordion Nav
$("#linkListSub3 li li").hide();
$("#linkListSub3 li").hover(function() {
if ($("li", this).is(":hidden")) {
$("#linkListSub3 li li").next().slideUp();
$("li", this).next().slideDown();
}
return false;
});
//Hide And show Toggle Bar animation
$(".toggleContainer").hide(); //Hide (Collapse) the toggle containers on load
//Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
$("a.trigger").click(function() {
$(this).toggleClass("active").next().slideToggle("slow");
return false; //Prevent the browser jump to the link anchor
});
실제로 준비 이벤트에 연결하는 방법을 실제로 볼 수 있으면 좋을 것입니다 ... – Leon
'$ (document) .ready (function() {'? 어떤 부분이 작동하고 어떤 부분이 실패합니까? –
이전 버전의 jQuery (1.2.6)를 사용하는 것이 중요합니까? 최신 버전에서는 코드가 완벽하게 작동합니다. – Samich