2017-08-03 46 views
-1

誰能告訴我爲什麼這個jQuery不能在IE8中工作?它在Chrome中正常工作,但不在IE中。有誰知道爲什麼這個jQuery不能在IE8中工作?

$(document).ready (function() { 
 
    $('.first-p').hide(); 
 
    $("div.first").click(function() { 
 
    $(this).next().slideToggle(1000); 
 
    }); 
 
});
<div class="first">Toggle first</div> 
 
<p class="first-p">First hidden paragraph.</p> 
 
<div class="first">Toggle second</div> 
 
<p class="first-p">Second hidden paragraph.</p> 
 
\t 
 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

回答

4

按照Jquery的頁面狀態

如果您需要支持舊的瀏覽器,如Internet Explorer 6-8,歌劇12.1倍或Safari 5.1+,使用jQuery 1.12。

您使用3.2.1版本

+0

它工作。謝謝! –

相關問題