I Want to start a jQuery function when the current Height of the Page (scroll bar) is in specify range, for example, from 1750px to 2750px, start a function, from 2751px to 3750px another function, i think the height of the page is measured in the first Vertical Px that is in your browser.
Sorry for the bad english,and sorry for not being very specific…
Use a
scrollhandler and.scrollTop(). Note, this will be called at every scroll movement, so you would need some code to keep track of what range you are in, and only fire if you change ranges:Demo: http://jsfiddle.net/9P4WK/
In this demo, I am simply toggling a class, so I don’t do any fancy range tracking.