[英]The bounce effect in jquery is not working?
當我使用JQuery單擊圖像時,無法使彈跳效果起作用。 它只是不會反彈。 我在下面提供了我的代碼。
<script type="text/javascript" src="js/jquery.js"></script>
<a href="#"><img id="cog" src="images/icons/cog.png" alt="User Settings"/></a>
$(document).ready(function() {
$("#cog").click(function() {
$(this).effect("bounce", {times: 3}, 500);
});
});
那是因為它是jQuery UI包的一部分。
嘗試添加此行
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
效果是jQueryUI的一部分,而不是jQuery。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.