Chrome 中 jQuery fadeIn() 和 fadeOut() 的问题

发布于 2024-09-27 07:25:20 字数 932 浏览 0 评论 0原文

我正在开发一个插件,但在 Chrome 中遇到了困难。该脚本在 FF 中完美运行,但 Chrome 无法正确显示淡入和淡出效果。看起来 Chrome 只是默认显示和隐藏。有什么建议吗?

您可以在这里看到它的实际效果: http://heartpublications.com

这是代码:

    $(document).ready(function() {

  function contentRotate(feature) {
 if (doAnimate) {  
   $("#slide1").fadeOut("fast", function (feature) {
     return function () {
    $("#banner div").hide();


    /* FADE IN NEXT ITEM OR GO BACK TO FIRST */
    feature.fadeIn("fast", function () {
      if ($(this).attr("id") == "slide3") {
     setTimeout(function () {
       contentRotate($("#banner div:first"));
     }, 4000);
      }
      else {
        setTimeout(function () {
       contentRotate($(feature.next()));
     }, 4000);
      }
    });
     };
   }(feature));
 }
  }



  var doAnimate = true;

  contentRotate($("#banner div:first"));




});

任何帮助将不胜感激。谢谢。

Have a plugin that I'm working on and I've hit a wall in Chrome. The script works perfectly in FF, but Chrome is not correctly displaying the fadeIn and fadeOut effects. It looks like Chrome is just defaulting to show and hide. Any suggestions?

You can see it in action here: http://heartpublications.com

Here is the code:

    $(document).ready(function() {

  function contentRotate(feature) {
 if (doAnimate) {  
   $("#slide1").fadeOut("fast", function (feature) {
     return function () {
    $("#banner div").hide();


    /* FADE IN NEXT ITEM OR GO BACK TO FIRST */
    feature.fadeIn("fast", function () {
      if ($(this).attr("id") == "slide3") {
     setTimeout(function () {
       contentRotate($("#banner div:first"));
     }, 4000);
      }
      else {
        setTimeout(function () {
       contentRotate($(feature.next()));
     }, 4000);
      }
    });
     };
   }(feature));
 }
  }



  var doAnimate = true;

  contentRotate($("#banner div:first"));




});

Any help would be appreciated. Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦幻的味道 2024-10-04 07:25:20

我在 jQuery 1.3.2 中遇到了同样的问题,但升级到最新版本(1.4.2)后它就消失了。

I had the same problem with jQuery 1.3.2 but it disappeared upgrading to the latest version (1.4.2).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文