javascript - Stop page from scrolling past specified Div (or Footer element) -


seemingly, question has been asked several times, not specific situation / needs.

i had product filter developed ecommerce site. it's working fine, however, setup involves products have been 'filtered out' being sent out of view @ bottom of site. whilst out of view customer, browser still allocates space them @ bottom, hence site scrolls past footer.

my question is; possible lock off scrolling @ part of page using jquery or css?

eg; stop scrolling @ base of footer. or slot in div id @ bottom of page , spec no scrolling past that?

many in advance.

damien

jsfiddle: http://jsfiddle.net/kwgmj/184/

you can handle scroll event , restrict scroll given value.

$(window).scroll(function(e) {        if($(window).scrolltop() >=150) {        $(window).scrolltop(150);     } }); 

just replace "150" y-position of desired div.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -