【问题标题】:JQuery Ui Effects not workingjQuery Ui 效果不起作用
【发布时间】: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 元素是什么?某些元素(例如 &lt;tr&gt;)的动画效果并不总是很好。
  • 元素是普通样式的div

标签: jquery effects


【解决方案1】:

将 jquery ui 链接从 1.5 版更改为 1.8 版

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>

【讨论】:

  • 它起作用了,但不是在编辑之后,在你编辑之前,就像&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"&gt;&lt;/script&gt;
  • 我当然知道 :-),但我需要 9 分钟才能接受答案
猜你喜欢
  • 2019-10-15
  • 1970-01-01
  • 1970-01-01
  • 2016-06-01
  • 1970-01-01
  • 2017-06-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多