开发者

Troubles with jQuery fadeIn() and fadeOut() in Chrome

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 Ch开发者_开发技巧rome 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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜