2010-10-28 57 views
1

我已經使這個jQuery腳本非常基本,但它仍然無法在IE中工作,但在其他瀏覽器中都可以使用;鉻,歌劇,safari和Firefox。jQuery在IE中不起作用

我上傳腳本,所以你可以看看

哎呀錯誤的URL

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

所有正確的我能得到的幫助非常感謝。

+0

我們不能訪問你的本地主機,查看網頁...的HTML片段將有助於調試.. – Oliver 2010-10-28 10:11:59

+0

我已經更新了相應的鏈接 – Breezer 2010-10-28 10:23:11

回答

2

啊,你需要防止單擊時鏈接的事件。

修訂本

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

我更新了鏈接,所以它應該工作。 那麼它不工作在ie8這是最​​奇怪的部分 我試圖在$(function(){})調用後添加警報,但沒有任何反應,因爲我在所有其他瀏覽器中獲得100警報 – Breezer 2010-10-28 10:18:02

+0

nope did not do it:/ – Breezer 2010-10-28 10:31:50

+0

我更新了我的答案 – Drewid 2010-10-28 10:33:19