2011-03-12 71 views
0

我正在一個Drupal 6網站環境中實現一個包含各種ColdFusion和靜態html頁面的調查提示器/提醒工具。我試圖在1.2.6的Drupal版本中使用jQuery 1.4.4。jQuery 1.4與jquery ui和drupal沒有衝突6

我進口的jQuery 1.4.4這樣的:

<code> 
<script type="text/javascript" src="/misc/jquery.js?7"></script> 
<script type="text/javascript" src="/misc/drupal.js?7"></script> 
<script type="text/javascript" src="/sites/all/modules/lightbox2/js/lightbox.js?7"></script> 
<script type="text/javascript" src="/sites/all/modules/poormanscron/poormanscron.js?7"></script> 
<script type="text/javascript" src="/sites/all/themes/realdecoy/scripts/jquery.carousel.js?7"></script> 
<script type="text/javascript" src="/sites/all/themes/realdecoy/scripts/jquery.superbox-min.js?7"></script> 
<script type="text/javascript" src="/sites/all/themes/realdecoy/scripts/swfobject.js?7"></script> 

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> 
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.js"></script> 
    <script type="text/javascript" src="/_inc/survey/jquery.cookie.js"></script> 
    <!-- this script starts with : var j144 = jQuery.noConflict() : which I believe should restore $ to the jQuery 1.2.6 instance --> 
    <!-- this then sets up numerous behaviors using the j144 instance --> 
    <script type="text/javascript" src="/_inc/survey/survey.js"></script> 
</code> 

現在又該(當我沒有1.2.6即沒有noConflict對付你確實發生)的用戶將加載頁面並被要求在訪問結束時參與調查。隨後使用cookie對用戶行爲進行一些監控,以檢測他們何時離開站點(即導航到頁面或單擊外部鏈接)。就像我說的,這一切都正常工作,並且我已經對此進行了測試,當時我正在使用ColdFusion腳本,並且不必使用noConflict來允許Drupal的jQuery共存。現在,它不會完全無故障地運行,但是整個過程非常麻煩並且不會一致地流動。

有沒有人有關於如何去尋找問題的建議?我在加載jQuery 1.4之後對一些正在加載的插件進行了一些小的編輯,並且我玩了代碼

回答

1

您確定不能升級Drupal的1.2.6版本嗎?它似乎也浪費了帶寬/ CPU /雨林來加載兩個單獨的jQuery版本。

到目前爲止,jQuery版本大多向後兼容。添加功能不僅僅是刪除它們。

+0

我會考慮更多.. – 2011-03-12 15:08:51

+1

http://drupal.org/project/jquery_update查看有關如何更新到1.4或1.5的drupal6的問題隊列 – corbacho 2011-03-12 18:21:38

+0

好吧,幾個問題..爲什麼不去爲jQuery 1.5.1而不是1.4.4?你有任何錯誤?你有鏈接到應用程序的錯誤版本? – arnorhs 2011-03-13 12:46:29