开发者

jQuery alert / scrollTop not working in Opera or IE7

开发者 https://www.devze.com 2023-01-11 06:38 出处:网络
Wondering why I get this alert to work in Firefox and Safari but not Opera or IE... an开发者_JAVA百科y insight much appreciated!

Wondering why I get this alert to work in Firefox and Safari but not Opera or IE... an开发者_JAVA百科y insight much appreciated!

    $().scroll(function() {
    var scrolledpx = parseInt($().scrollTop());  

    if (scrolledpx < 375) {
        alert('true');
    }
});


 $(window).scroll(function() {
    var scrolledpx = parseInt($(window).scrollTop());  

    if (scrolledpx < 375) {
        alert('true');
    }
});
0

精彩评论

暂无评论...
验证码 换一张
取 消