2011-10-07 2 views
0

마침내 얻었습니다! 나는 CSS를로드하지 않았다! 어리석은 me ... 다른 문제와 함께 나를 도와 줘서 고마워!jquery가 완전히 작동하지 않습니다 (안정적인 "jquery-ui-1.8.16.custom.min.js")

레일에 로컬로 레일을 사용하고 있습니다.

"JQuery와-UI-1.8.16.custom.min.js"& "JQuery와-1.6.2.min.js"난에의 jQuery UI "아코디언"을 얻을 수 있었다

와 함께 작동하도록 시도 그냥 잘 작동 .. "탭"작동하지 않습니다!

I했습니다 (JQuery와 UI "탭을"사용하기)

<script type="text/javascript" src="/javascripts/jquery-ui-1.8.16.custom/js/jquery-ui-1.8.16.custom.min.js"> 
<script type="text/javascript" src="/javascripts/jquery-ui-1.8.16.custom/js/jquery-1.6.2.min.js"> 

불을 지르고는 다음과 같은 3 오류를 표시 ... 파일이 적절하고 올바른 위치에서 호출되어 있는지 확인하십시오

jQuery is not defined 
[Break On This Error] c.ui.isOverAxis(b,e,i)}})}})(jQuery); 


jquery...4700986 (line 18) 
element.dispatchEvent is not a function 
[Break On This Error] element.dispatchEvent(event); 


protot...4640791 (line 5653) 
$("#tabs").tabs is not a function 
[Break On This Error] $("#tabs").tabs(); 

이러한 오류는 jQuery UI lib가 "안정적인"링크에서 방금 다운로드 한 내용이 잘못되었음을 알립니다.이 경우입니까? 아니면 여기에 다른 문제가 있습니까?

감사합니다.

내 libs와의 순서를 변경 한 후 나는

element.dispatchEvent is not a function 

는 [이 오류에 브레이크] ... (1) 오류 (프로토 타입 lib 디렉토리와 오류)로 내려받을 수 있었다 element.dispatchEvent (이벤트) ; 아래

내 탭의 HTML과 JS를 포함하는 갱신 ...

<div id="tabs"> 
<ul> 
    <li><a href="#tabs-1">tab1</a></li> 
    <li><a href="#tabs-2">tab2</a></li> 
    <li><a href="#tabs-3">tab3</a></li> 
</ul> 
<div id="tabs-1"> 
    <p>tab1 content</p> 
</div> 
<div id="tabs-2"> 
    <p>tab2 content</p> 
</div> 
<div id="tabs-3"> 
    <p>tab3 content</p> 
</div> 
    </div> 

jQuery를 수 있습니다 :

$(document).ready(function(){ 


$("#tabs").tabs(); 

}); 

을 나는 (.hide "와".tabs() "를 교체 할 때) "탭 요소가 제대로 숨겨져 있습니다 ...

여기서 내가 뭘 잘못하고 있니? 나는 또한 다음 JS와 noConflict 모드 시도

:

jQuery(document).ready(function(){ 
var $j = jQuery.noConflict(); 

    $j("#tabs").tabs(); 

}); 

같은 문제를 ...

+1

당신은 당신의 HTML과 JS 코드를 게시 할 수 있습니까? jQuery가 불안정한 릴리스를 릴리스 할 것 같지 않습니다. – Blender

+0

원래 질문을 html, js 및 최신 오류로 업데이트했습니다. 감사! – twinturbotom

답변

5

귀하의 오류 :

jQuery is not defined

이가 번역 : 당신의 <script> 태그가에 잘못된 순서.

jQuery를 jQuery를 UI 전에로드해야

:

<script type="text/javascript" src="/javascripts/jquery-ui-1.8.16.custom/js/jquery-1.6.2.min.js"> 
<script type="text/javascript" src="/javascripts/jquery-ui-1.8.16.custom/js/jquery-ui-1.8.16.custom.min.js"> 
+0

이런! 감사! 이제 1 오류가 표시됩니다. element.dispatchEvent가 함수가 아닙니다. [Break On This Error] element.dispatchEvent (event); – twinturbotom

+0

http://stackoverflow.com/questions/980697/element-dispatchevent-is-not-a-function-js-error-caught-in-firebug-of-ff3-0 – Blender

+0

수정하지 못했습니다. (.. .하지만 그 오류를 추적하면 lib에 프로토 타입이 생겨서 noConflict로 좀 더 놀 것입니다. – twinturbotom

관련 문제