/cody/learning-zone/website-templates/eat-restaurant-bootstrap-html5-template/js/custom.js
jQuery(function($) {
'use strict';
$('#quote-carousel').carousel({ pause: true, interval: 4000, });
new WOW().init();
$(function() { $('a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); if (target.length) { $('html,body').animate({ scrollTop: target.offset().top - 40 }, 1000); return false; } } }); });
$('#header_wrapper').scrollToFixed(); $('.res-nav_click').click(function() { $('.mainNav').slideToggle(); return false
});
$('#main-nav').onePageNav({ currentClass: 'active', changeHash: false, scrollSpeed: 950, scrollThreshold: 0.2, filter: '', easing: 'swing', begin: function() {}, end: function() { if (!$('#main-nav ul li:first-child').hasClass('active')) { $('.header').addClass('addBg'); } else { $('.header').removeClass('addBg'); }
}, scrollChange: function($currentListItem) { if (!$('#main-nav ul li:first-child').hasClass('active')) { $('.header').addClass('addBg'); } else { $('.header').removeClass('addBg'); } } });
});