Advertisement
asadsuman

Jquery-Smooth-scrolling-scrollspy

Oct 19th, 2015
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. (function ($) {
  2. "use strict";
  3.  
  4. jQuery(document).ready(function($){
  5.  
  6.  
  7. $(".embed-responsive iframe").addClass("embed-responsive-item");
  8. $(".carousel-inner .item:first-child").addClass("active");
  9.  
  10. $('[data-toggle="tooltip"]').tooltip();
  11.  
  12. $(".header-area").sticky({topSpacing:0});
  13.  
  14. //jQuery smooth scrool
  15. $('li.smooth-menu a').bind('click', function(event){
  16. var $anchor = $(this);
  17. var headerH = '65';
  18. $('html, body').stop().animate({
  19. scrollTop : $($anchor.attr('href')).offset().top - headerH + "px"
  20. }, 1200, 'easeInOutExpo');
  21.  
  22. event.preventDefault();
  23. });
  24.  
  25. //jQuery Scroll spy
  26. $('body').scrollspy({
  27. target: '.navbar-collapse',
  28. offset: 95
  29. });
  30.  
  31. //Scrolly Parallax plugin
  32. $('.parallax-bg, .top-area-bg').scrolly({bgParallax: true});
  33.  
  34. //Mobile menu
  35.  
  36. $(".navbar-toggle").click(function(){
  37. $("body").addClass("mobile-menu-activated");
  38. });
  39. $("ul.nav.navbar-nav li a").click(function(){
  40. $(".navbar-collapse").removeClass("in");
  41. });
  42.  
  43.  
  44. });
  45.  
  46.  
  47. jQuery(window).load(function(){
  48.  
  49.  
  50. });
  51.  
  52.  
  53. }(jQuery));
  54.  
  55.  
  56. <!---- Parallax Effect Js --- Scrolly -->
  57. http://lab.victorcoulon.fr/javascript/scrolly/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement