我有一個問題,使用jQuery effect()函數在圖像上創建反彈效果。 其實是使用此代碼(代碼調用jQuery庫後):jQuery效果()函數不被識別
$(document).ready(function() {
$('#arrow-disclaimer').bind('mouseenter', function(){
$(this).effect('bounce',500);
});
});
//Here there isn't the jQuery library, but in the page is included before jqueryUI
<link rel="stylesheet" type="text/css" href="css/style-disclaimer.css">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/i18n/jquery-ui-i18n.js"></script>
<a href="#disclaimer-p">
<img src="images/arrow483.png" id="arrow-disclaimer" />
</a>
有人能告訴我,爲什麼我得到這個錯誤?
Uncaught TypeError: $(...).effect is not a function
jQuery的UI需要的jQuery和jQuery應該把它的所有家屬之前加載。 – Tushar
嘗試在jquery-ui之前定義jquery –
我已更新帖子,但它不起作用 –