jQuery滑动框不能在IE8中工作 [英] Jquery sliding boxes not working in IE8

查看:115
本文介绍了jQuery滑动框不能在IE8中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的jquery代码在IE8上面添加doctype时似乎不起作用。

可能有一种方法可以重新构造这些代码以使其工作在ie8中。

  $(document).ready(function(){
// Caption Sliding(Partially Hidden to可见)
$('。boxgrid.caption')。hover(function(){
$(。cover,this).stop()。animate({top:'0px'}, {queue:false,duration:160});
},function(){
$(。cover,this).stop()。animate({top:'161px'},{队列:假,持续时间:160});
});
});


网站可以在这里看到:

http://www.keencloudmedia.com/sample/test.html



预先感谢!

解决方案

试试这个

  $(document).ready(function(){
$('。boxgrid.caption')。mouseenter(function(){
$ (.cover,this).stop()。animate({'top':'0px'},160);
});
$('。boxgrid.caption')。mouseleave (函数(){
$(。cover,this).stop()。animate({'top':'161px'},160);
});
} );

,您可以使用此元标记(与jquery合作)

 < meta http-equiv =content-typecontent =text / html; charset = UTF-8/> 


My Jquery code doesn't seem to work in IE8 when adding a doctype above my html tag.

Maybe there's a way to restructure these codes to have it working in ie8.

$(document).ready(function(){
            //Caption Sliding (Partially Hidden to Visible)
            $('.boxgrid.caption').hover(function(){
                $(".cover", this).stop().animate({top:'0px'},{queue:false,duration:160});
            }, function() {
                $(".cover", this).stop().animate({top:'161px'},{queue:false,duration:160});
            });
        });


The website can be seen here:

http://www.keencloudmedia.com/sample/test.html

Thanks in advance!

解决方案

try this

$(document).ready(function(){
        $('.boxgrid.caption').mouseenter(function(){
            $(".cover", this).stop().animate({'top':'0px'},160);
        });
        $('.boxgrid.caption').mouseleave(function() {
            $(".cover", this).stop().animate({'top':'161px'},160);
        });
    });

and you can use this meta tag (works with jquery excellent)

    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />

这篇关于jQuery滑动框不能在IE8中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆