http://dev.mindboiler.lv/(你會被帶到介紹頁面,只需點擊標識進入真正的網站)jQuery腳本在IE和Opera失敗
這是網站,我目前的工作。您可以將語言更改爲英語以更好地理解它,但無論如何,它都是虛擬文本。
有這些Read more
鏈接,點擊後,執行下面的jQuery:
$('.content-item .readmore').toggle(function() {
parent = $(this).parent();
$(parent).children('div.next').fadeIn();
$(this).html("Read less »");
}, function() {
parent = $(this).parent();
$(parent).children('div.next').fadeOut();
$(this).html("Read more »");
});
火狐,Safari,Chrome的工作就像一個魅力,不過IE(所有版本)和Opera不希望執行它正常。
任何解決方案,以在IE和Opera工作?
P.S.不是JavaScript/jQuery大師,因此該腳本看起來像垃圾。
在此先感謝!
有時候,如果事情不能在IE _and_歌劇院工作,這是一個跡象表明,你的標記結構是錯誤的,而不是腳本(如果它只在IE中不起作用,這可能表明您正在編寫出色的符合標準的代碼。)您是否驗證了該頁面? http://validator.w3.org – 2010-09-10 14:10:46