0
如何停止在IE8/9中運行以下腳本?出於某種原因,有時候這些部分會消失,有時候不會,所以我更喜歡在IE8/9中關閉它。在IE中停止JS
$(document).ready(function() {
/* Every time the window is scrolled ... */
$(window).scroll(function(){
/* Check the location of each desired element */
$('.hideme').each(function(i){
var bottom_of_object = $(this).position().top + $(this).outerHeight();
var bottom_of_window = $(window).scrollTop() + $(window).height();
/* If the object is completely visible in the window, fade it it */
if(bottom_of_window > bottom_of_object){
$(this).animate({'opacity':'1'},1500);
}
});
});
});
使用'<! - [if gt IE 9]>' – 2015-04-04 16:02:09
唯一的問題是,這是在一個單獨的JS文件,我不認爲你可以把腳本標記內的JS文件?雖然我不確定。 – 2015-04-05 17:04:59
您可以在條件註釋中鏈接該腳本... – Teemu 2015-04-05 18:22:09