3 =========================================================
4 * Material Kit - v1.1.1.0
5 =========================================================
7 * Product Page: http://www.creative-tim.com/product/material-kit
8 * Copyright 2017 Creative Tim (http://www.creative-tim.com)
9 * Licensed under MIT (https://github.com/timcreative/material-kit/blob/master/LICENSE.md)
11 =========================================================
13 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
17 var transparent = true;
19 var transparentDemo = true;
22 var navbar_initialized = false;
24 $(document).ready(function(){
26 // Init Material scripts for buttons ripples, inputs animations etc, more info on the next link https://github.com/FezVrasta/bootstrap-material-design#materialjs
29 // Activate the Tooltips
30 $('[data-toggle="tooltip"], [rel="tooltip"]').tooltip();
32 // Activate Datepicker
33 if($('.datepicker').length != 0){
34 $('.datepicker').datepicker({
39 // Check if we have the class "navbar-color-on-scroll" then add the function to remove the class "navbar-transparent" so it will transform to a plain color.
40 if($('.navbar-color-on-scroll').length != 0){
41 $(window).on('scroll', materialKit.checkScrollForTransparentNavbar)
45 $('[data-toggle="popover"]').popover();
48 $('.carousel').carousel({
56 navbar_menu_visible: 0
59 checkScrollForTransparentNavbar: debounce(function() {
60 if($(document).scrollTop() > 260 ) {
63 $('.navbar-color-on-scroll').removeClass('navbar-transparent');
68 $('.navbar-color-on-scroll').addClass('navbar-transparent');
73 initSliders: function(){
74 // Sliders for demo purpose
75 $('#sliderRegular').noUiSlider({
84 $('#sliderDouble').noUiSlider({
99 checkScrollForParallax: debounce(function(){
100 var current_scroll = $(this).scrollTop();
102 oVal = ($(window).scrollTop() / 3);
104 'transform':'translate3d(0,' + oVal +'px,0)',
105 '-webkit-transform':'translate3d(0,' + oVal +'px,0)',
106 '-ms-transform':'translate3d(0,' + oVal +'px,0)',
107 '-o-transform':'translate3d(0,' + oVal +'px,0)'
113 // Returns a function, that, as long as it continues to be invoked, will not
114 // be triggered. The function will be called after it stops being called for
115 // N milliseconds. If `immediate` is passed, trigger the function on the
116 // leading edge, instead of the trailing.
118 function debounce(func, wait, immediate) {
121 var context = this, args = arguments;
122 clearTimeout(timeout);
123 timeout = setTimeout(function() {
125 if (!immediate) func.apply(context, args);
127 if (immediate && !timeout) func.apply(context, args);