- $(window).scroll(function(){
- if(this.pageYOffset + $(this).height() > $(document).height() - 200){
- $('div').css('background', 'red'); //do popup
- }
- });
in response to my question of triggering a popup when scroller reached particular height...
Problem is this part:
- this.pageYOffset + $(this).height()
why used $ in the 2nd this but not the first?