Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. jQuery(document).ready(function($){
  2.  
  3. /************************************/
  4. /*  RESIZE
  5. /************************************/
  6.  
  7. function windowResizeFunctions(e) {
  8.    
  9.     var windowH = $(window).height(),
  10.         headerH = $('.site-header').height();
  11.        
  12.     $('.banner').css('height', windowH);
  13.    
  14. }
  15.  
  16. $(window).resize(function(){
  17.     window.requestAnimationFrame(windowResizeFunctions);
  18. });  
  19.  
  20. setTimeout(function() { windowResizeFunctions(); } );
  21.  
  22. });
  23.  
  24.  
  25. /************************************/
  26. /*  SCROLL TO
  27. /************************************/
  28. (function($) {
  29.       $('a[href*=#]:not([href=#])').click(function()
  30.       {
  31.         if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
  32.             || location.hostname == this.hostname)
  33.         {
  34.          
  35.           var target = $(this.hash),
  36.           headerHeight = $(".site-header").height(); // Get fixed header height
  37.                
  38.           target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
  39.                  
  40.           if (target.length)
  41.           {
  42.             $('html,body').animate({
  43.               scrollTop: target.offset().top - headerHeight
  44.             }, 500);
  45.             return false;
  46.           }
  47.         }
  48.       });
  49.     })(jQuery);
  50.  
  51.  
  52. $(document).ready(function(){
  53.  
  54. /************************************/
  55. /*  OWL CAROUSEL
  56. /************************************/
  57. $('#owl-partners').owlCarousel({
  58.         margin: 20,
  59.         dots: false,
  60.         nav: false,
  61.         navText: [],
  62.         loop: true,
  63.         autoplay: true,
  64.         autoplayHoverPause: true,
  65.         responsive: {
  66.             0: {
  67.                 items: 1
  68.             },
  69.             600: {
  70.                 items: 3
  71.             },
  72.             1000: {
  73.                 items: 6
  74.             }
  75.         }
  76.     });
  77.  
  78. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement