簡體   English   中英

jQuery在IE6和7中不起作用

[英]Jquery not working in IE6 and 7

您好堆棧溢出!

相當糟糕的問題。 我的Jquery都無法在IE6和7中運行。我在Google周圍搜索解決方案,但擺弄得一無所獲! 我已經嘗試了所有不同的文檔,但Jquery函數包裝沒有成功。 我的代碼如下

jQuery包含

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>

腳本文件包含

<script type="text/javascript" src="/resource/js/script.js"></script>

最后是我的代碼

jQuery(function() {
    var timer = 0;     
    $('.item').hide().each(function() {
        $(this).delay(timer).fadeIn('slow');
        timer += 500;
    });
});

任何幫助將是巨大的,謝謝!

在包含jQuery UI之前,您需要包含常規jQuery。

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>

另外, fadeIn在IE6中將不起作用,因為IE6不支持透明性。

我看不到您的代碼有什么問題。 您的HTML標記是什么樣的? 如果無效,則IE可能試圖對其進行“修復”,從而導致結構不符合您的期望,或者根本沒有運行腳本。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM