¡@

Home 

2014/10/16 ¤W¤È 12:10:22

jquery Programming Glossary: windowtop

Fix thead on page scroll

http://stackoverflow.com/questions/2382083/fix-thead-on-page-scroll

class 'fixed' to the lt thead window .scroll function var windowTop window .scrollTop if windowTop settings.table.offset .top .. .scroll function var windowTop window .scrollTop if windowTop settings.table.offset .top thead settings.table .addClass fixed..

Scroll to an element using jQuery

http://stackoverflow.com/questions/4217962/scroll-to-an-element-using-jquery

this.offset .top var cHeight this.outerHeight true var windowTop window .scrollTop var visibleHeight window .height if cTop windowTop.. window .scrollTop var visibleHeight window .height if cTop windowTop if smooth 'body' .animate 'scrollTop' cTop 'slow' 'swing' else.. 'swing' else window .scrollTop cTop else if cTop cHeight windowTop visibleHeight if smooth 'body' .animate 'scrollTop' cTop visibleHeight..

Check if div is viewable in window?

http://stackoverflow.com/questions/8114611/check-if-div-is-viewable-in-window

myElt.offset .top the top y location of your element var windowTop window.scrollTop the top of the window var windowBottom windowTop.. window.scrollTop the top of the window var windowBottom windowTop window.height the bottom of the window Then to make sure your.. sure your element is within the window's range... if myTop windowTop myTop windowBottom element is in the window else element is..

Fix thead on page scroll

http://stackoverflow.com/questions/2382083/fix-thead-on-page-scroll

settings.thead i here we attach to the scroll adding the class 'fixed' to the lt thead window .scroll function var windowTop window .scrollTop if windowTop settings.table.offset .top thead settings.table .addClass fixed else thead settings.table.. to the scroll adding the class 'fixed' to the lt thead window .scroll function var windowTop window .scrollTop if windowTop settings.table.offset .top thead settings.table .addClass fixed else thead settings.table .removeClass fixed function..

Scroll to an element using jQuery

http://stackoverflow.com/questions/4217962/scroll-to-an-element-using-jquery

version jQuery.fn.scrollMinimal function smooth var cTop this.offset .top var cHeight this.outerHeight true var windowTop window .scrollTop var visibleHeight window .height if cTop windowTop if smooth 'body' .animate 'scrollTop' cTop 'slow' 'swing'.. .top var cHeight this.outerHeight true var windowTop window .scrollTop var visibleHeight window .height if cTop windowTop if smooth 'body' .animate 'scrollTop' cTop 'slow' 'swing' else window .scrollTop cTop else if cTop cHeight windowTop visibleHeight.. windowTop if smooth 'body' .animate 'scrollTop' cTop 'slow' 'swing' else window .scrollTop cTop else if cTop cHeight windowTop visibleHeight if smooth 'body' .animate 'scrollTop' cTop visibleHeight cHeight 'slow' 'swing' else window .scrollTop cTop..

Check if div is viewable in window?

http://stackoverflow.com/questions/8114611/check-if-div-is-viewable-in-window

check var window window the window jQuery element var myTop myElt.offset .top the top y location of your element var windowTop window.scrollTop the top of the window var windowBottom windowTop window.height the bottom of the window Then to make sure.. .top the top y location of your element var windowTop window.scrollTop the top of the window var windowBottom windowTop window.height the bottom of the window Then to make sure your element is within the window's range... if myTop windowTop.. window.height the bottom of the window Then to make sure your element is within the window's range... if myTop windowTop myTop windowBottom element is in the window else element is NOT in the window maybe use this to scroll... 'html body' .animate..