
com.jwebmp.plugins.angularscrollposition.scrollPosition.min.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jwebmp-angular-scroll-position Show documentation
Show all versions of jwebmp-angular-scroll-position Show documentation
The JWebSwing implementation for Angular Scroll Position
JW_APP_NAME.directive("scrollPosition",scrollPosition);function scrollPosition(){return{scope:{scrollPosition:"=",maxHeight:"="},link:function(scope){$(window).on("scroll",function(){var scrollTop=$(window).scrollTop()>scope.maxHeight;if(scrollTop!==scope.prevScrollTop){scope.$apply(function(){scope.scrollPosition=scrollTop})}scope.prevScrollTop=scrollTop})}}}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy