Breezer
Breezer

Reputation: 10490

jQuery doesn't work in IE

I've made this jQuery script quite basic really, but yet it fails to work in IE, but works in every other browser have tried it in; chrome, opera, safari and Firefox.

I've uploaded the script so you can take a look

oops wrong url

http://ddart.isgreat.org/test2/ this is the right one

the code is following

$(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;
    });
});

all help I can get is very much appreciated.

Upvotes: 1

Views: 427

Answers (1)

Drewid
Drewid

Reputation: 1981

Ahh you need to prevent the event of the link when clicked.

Amend this

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

Upvotes: 2

Related Questions