jQuery在IE中不起作用

时间:2010-10-28 10:01:45

标签: jquery internet-explorer

我真的把这个jQuery脚本做得很基本,但它却无法在IE中运行,但是在其他所有浏览器中都可以使用它。 chrome,opera,safari和Firefox。

我上传了这个脚本,所以你可以看看

oops错误的网址

http://ddart.isgreat.org/test2/ 这是正确的

代码正在关注

$(function () {
    $('#uploadfile').click(function(){
        document.file.submit();
    });
    $('#upload ul li a.size').click(function(){
        if($('li#content').width() == 50){
            $('li#content').animate({
                        width:"540px"
            }, 1000,function(){
                $('#upload img[width=17]').fadeOut('fast', function(){
                    $('#upload img[width=17]').attr('src','images/arrow_left.png');
                    $('#file').fadeIn();
                    $('#upload img[width=17]').fadeIn();
                });
            });
        }else{
            $('#file').fadeOut(function() {
                $('li#content').animate({
                            width:"50px"
                }, 1000,function(){
                    $('#upload img[width=17]').fadeOut('fast', function(){
                        $('#upload img[width=17]').attr('src','images/arrow_right.png');
                        $('#upload img[width=17]').fadeIn();
                    });
                });
            });
        };
            return false;
    });
});

非常感谢我能得到的所有帮助。

1 个答案:

答案 0 :(得分:2)

啊,你需要在点击时阻止链接事件。

修改此

$('#upload ul li a.size').click(function(e){
    e.preventDefault();
相关问题