views:

37

answers:

1

Ive 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

ops 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

+2  A: 

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

Amend this

$('#upload ul li a.size').click(function(e){
    e.preventDefault();
Drewid
I updated the link so it should work.Well it doesnt work in ie8 that's the weirdest partI've tried to add alert just after the $(function () {}) call but nothing happens where as i get 100 alerts in all other browsers
Breezer
nope didnt do it :/
Breezer
Ive updated my answer
Drewid
i just tried that but nothing happens ... damn I hate ie
Breezer
lol you'll never guess what the error was... changed<script language="javascript" type="application/javascript"to<script type="text/javascript"
Breezer
haha wow, had me stumped. Good catch, was about to say sounds like something more fundamentally wrong with :)
Drewid
thx for the help anyways appreciate it alot for taking your time
Breezer