问题
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!
回答1:
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" />
来源:https://stackoverflow.com/questions/11200515/jquery-sliding-boxes-not-working-in-ie8