jQuery, .click , .animate, etc. in IE



此代码在Chrome中工作完美,但在IE中不工作。

我在网上看到过类似的问题,但不太明白解决方案,也许发布具体的代码会帮助我。谢谢。

<script type="text/javascript">

$(document).ready(function(){
    $("#bgimage").slideDown();
    $("#rcapmenu").delay(1000).animate({opacity: ".9", filter: "alpha(opacity=90)", top: "75%", height: "168px"}, "slow");
        $("#menutext").delay(1500).animate({height: "45px"}, "slow");
    $("#LOGIN").delay(2200).animate({height: "44px", left: "0px"}, "slow");
    $("#CLIENT").delay(2500).animate({height: "44px", left: "0px"}, "slow");
    $("#ABOUT").delay(2800).animate({height: "44px", left: "0px"}, "slow");
    $("#MANAGER").delay(3100).animate({height: "44px", left: "0px"}, "slow");
    $("#rcaplogo").delay(2100).animate({opacity: "1", filter: "alpha(opacity=100)"}, "slow");       $(".slidingDiv").hide();
$('#MANAGER').bind('click', function(){
$(".slidingDiv").animate({height: "0px", top: "455px"}, "slow").delay(1000).animate({height: "450px", top: "0px"}, "slow");
getdata('text.php','slidingDiv');
});
$('#ABOUT').click(function(){
$(".slidingDiv").animate({height: "0px", top: "455px"}, "slow").delay(1000).animate({height: "450px", top: "0px"}, "slow");
getdata('text.php','slidingDiv');
});
$('#CLIENT').click(function(){
$(".slidingDiv").animate({height: "0px", top: "455px"}, "slow").delay(1000).animate({height: "450px", top: "0px"}, "slow");
getdata('text.php','slidingDiv');
});
$('#LOGIN').click(function(){
$(".slidingDiv").animate({height: "0px", top: "455px"}, "slow").delay(1000).animate({height: "450px", top: "0px"}, "slow");
getdata('text.php','slidingDiv');
});
$('.right').click(function(){
$(".slidingDiv").animate({height: "0px", top: "455px"}, "slow");
}); 
});
</script>

当我点击具有相应id的div时,在IE中没有发生任何事情,但在Chrome中,我正在寻找的效果完美地发生。我尝试了两个。bind('click', function() .....点击。可以看到。

我建议把效果放在一个新的JQuery函数中,像这样:

jQuery.fn.EFFECT NAME = YOUR EFFECT

你可以这样写:

$('#id').EFFECT NAME();

对不起,我不能再帮忙了,但这可能会改善一点代码

最新更新