开发者

jQuery fadein/fadeout ONLY in FF and Opera

I loaded my site into other browers and the menu fadein/out effect seems to only work in FF and opera. It didnt work in IE(7-9), safari, or chrome. For these browsers it had a show/hide effect instead of fading. here is my site.

JS:

var delay = 100;
var fade = 400;

$j(function(){
    var inner="";
    $j('#access-navi .sub > a').toggle(function(){
        inner=$j(this).parent().find('ul li');
        inner.each(function(i){
            $j(this).delay(i*delay).fadeIn(fade);
        });
    },function(){
        inner.fadeOut(fade/2);
    });
}); 

HTML:

<div id="access-navi" role="navigation">
   <ul>
    <li><a href="">Home</a></li>
    <li class="sub"><a href="#">Code</a>
     <ul>
      <li><a href="">Html.Css</a></li>
      <li><a href="">Java开发者_运维问答</a></li>
      <li><a href="">jQuery</a></li>
      <li><a href="">Php</a></li>
     </ul>
    </li>
   </ul>
   <div class="clear"></div>
  </div>


If you are not married to jQuery version 1.4.2 then I recommend version 1.4.4. I downloaded your page source, changed the jQuery version to 1.4.4 hosted on the Google CDN and the fade in and out worked locally on my IE8 install.

<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js?ver=1.4.4'></script> 
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜