diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-03-25 13:13:28 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-03-25 13:13:28 +0100 |
| commit | ca88c377f918a9178c56e206b7bb13baefd30c91 (patch) | |
| tree | e4ee2a5fda2ed378e9d103c627e9cb2a40f47310 /templates/assets/material-kit/dist/js/material-kit.js | |
| parent | b1bbeb2e2db4a287e7ccf627c2dc450cf5a53b62 (diff) | |
| download | minionlivesmatter-ca88c377f918a9178c56e206b7bb13baefd30c91.tar.gz minionlivesmatter-ca88c377f918a9178c56e206b7bb13baefd30c91.zip | |
accidentally committed minionlivesmatter changes to meta
Diffstat (limited to 'templates/assets/material-kit/dist/js/material-kit.js')
| -rw-r--r-- | templates/assets/material-kit/dist/js/material-kit.js | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/templates/assets/material-kit/dist/js/material-kit.js b/templates/assets/material-kit/dist/js/material-kit.js new file mode 100644 index 0000000..9aefe03 --- /dev/null +++ b/templates/assets/material-kit/dist/js/material-kit.js @@ -0,0 +1,129 @@ +/*! + + ========================================================= + * Material Kit - v1.1.1.0 + ========================================================= + + * Product Page: http://www.creative-tim.com/product/material-kit + * Copyright 2017 Creative Tim (http://www.creative-tim.com) + * Licensed under MIT (https://github.com/timcreative/material-kit/blob/master/LICENSE.md) + + ========================================================= + + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + */ + +var transparent = true; + +var transparentDemo = true; +var fixedTop = false; + +var navbar_initialized = false; + +$(document).ready(function(){ + + // Init Material scripts for buttons ripples, inputs animations etc, more info on the next link https://github.com/FezVrasta/bootstrap-material-design#materialjs + $.material.init(); + + // Activate the Tooltips + $('[data-toggle="tooltip"], [rel="tooltip"]').tooltip(); + + // Activate Datepicker + if($('.datepicker').length != 0){ + $('.datepicker').datepicker({ + weekStart:1 + }); + } + + // 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. + if($('.navbar-color-on-scroll').length != 0){ + $(window).on('scroll', materialKit.checkScrollForTransparentNavbar) + } + + // Activate Popovers + $('[data-toggle="popover"]').popover(); + + // Active Carousel + $('.carousel').carousel({ + interval: 400000 + }); + +}); + +materialKit = { + misc:{ + navbar_menu_visible: 0 + }, + + checkScrollForTransparentNavbar: debounce(function() { + if($(document).scrollTop() > 260 ) { + if(transparent) { + transparent = false; + $('.navbar-color-on-scroll').removeClass('navbar-transparent'); + } + } else { + if( !transparent ) { + transparent = true; + $('.navbar-color-on-scroll').addClass('navbar-transparent'); + } + } + }, 17), + + initSliders: function(){ + // Sliders for demo purpose + $('#sliderRegular').noUiSlider({ + start: 40, + connect: "lower", + range: { + min: 0, + max: 100 + } + }); + + $('#sliderDouble').noUiSlider({ + start: [20, 60] , + connect: true, + range: { + min: 0, + max: 100 + } + }); + } +} + + +var big_image; + +materialKitDemo = { + checkScrollForParallax: debounce(function(){ + var current_scroll = $(this).scrollTop(); + + oVal = ($(window).scrollTop() / 3); + big_image.css({ + 'transform':'translate3d(0,' + oVal +'px,0)', + '-webkit-transform':'translate3d(0,' + oVal +'px,0)', + '-ms-transform':'translate3d(0,' + oVal +'px,0)', + '-o-transform':'translate3d(0,' + oVal +'px,0)' + }); + + }, 6) + +} +// Returns a function, that, as long as it continues to be invoked, will not +// be triggered. The function will be called after it stops being called for +// N milliseconds. If `immediate` is passed, trigger the function on the +// leading edge, instead of the trailing. + +function debounce(func, wait, immediate) { + var timeout; + return function() { + var context = this, args = arguments; + clearTimeout(timeout); + timeout = setTimeout(function() { + timeout = null; + if (!immediate) func.apply(context, args); + }, wait); + if (immediate && !timeout) func.apply(context, args); + }; +}; |
