Guest User

Untitled

a guest
Oct 17th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. <script>
  2. (function () {
  3. jQuery(window).load(function () {
  4. var ua = window.navigator.userAgent;
  5. ms_ie = /MSIE|Trident/.test(ua);
  6. if ( ! ms_ie ) {
  7. jQuery('.new-home-section').parallaxie({
  8. speed: 0.5,
  9. offset: 0,
  10. });
  11. }
  12.  
  13. var top = $('.new-home-section:first').offset().top - 50;
  14. var bottom = $('.new-home-section:last').offset().top + $('.new-home-section:last').outerHeight();
  15. $(window).scroll(function (e) {
  16. var scrollPosition = $(window).scrollTop();
  17. if (scrollPosition >= top && scrollPosition <= bottom) {
  18. $("body").niceScroll({
  19. scrollspeed: 250,
  20. mousescrollstep: 35
  21. });
  22. } else {
  23. $("body").getNiceScroll().remove();
  24. }
  25. });
  26.  
  27.  
  28. })
  29. })();
  30. </script>
Add Comment
Please, Sign In to add comment