【发布时间】:2013-03-01 14:28:57
【问题描述】:
当我使用 hide() 或 show() 时,它们可以工作 - 但当我使用 effect() 时,它们不会,这里有一些代码和平:
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
我的脚本是:
<script type="text/javascript">
$(document).ready(function() {
$(".palas").fadeIn(2000);
/*$(".palas").click(function () {
$(this).hide( "fold",
{horizFirst: true }, 2000 );
});*/
$(".palas").click(function () {
$(this).hide();
});
});
</script>
未注释的部分运行良好,注释的部分不是,我什至尝试了更多选项。
【问题讨论】:
-
jQuery UI 1.8 和 jQuery 1.5?为什么不使用最新版本?试试 jQuery 1.8.3+ 和 jQuery UI 1.9.2。
-
.palas元素是什么?某些元素(例如<tr>)的动画效果并不总是很好。 -
元素是普通样式的
div