phpvms/public/vendor/popper.js/docs/js/main.js
2017-08-15 18:07:14 -05:00

120 lines
2.8 KiB
JavaScript
Executable File

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-75790772-1', 'auto');
ga('send', 'pageview');
/*
Spectral by HTML5 UP
html5up.net | @n33co
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
(function($) {
skel
.breakpoints({
xlarge: '(max-width: 1680px)',
large: '(max-width: 1280px)',
medium: '(max-width: 980px)',
small: '(max-width: 736px)',
xsmall: '(max-width: 480px)'
});
$(function() {
var $window = $(window),
$body = $('body'),
$wrapper = $('#page-wrapper'),
$banner = $('#banner'),
$header = $('#header');
// Disable animations/transitions until the page has loaded.
$window.on('load', function() {
window.setTimeout(function() {
$body.removeClass('is-loading');
}, 100);
});
// Mobile?
if (skel.vars.mobile)
$body.addClass('is-mobile');
else
skel
.on('-medium !medium', function() {
$body.removeClass('is-mobile');
})
.on('+medium', function() {
$body.addClass('is-mobile');
});
// Fix: Placeholder polyfill.
$('form').placeholder();
// Prioritize "important" elements on medium.
skel.on('+medium -medium', function() {
$.prioritize(
'.important\\28 medium\\29',
skel.breakpoint('medium').active
);
});
// Scrolly.
$('.scrolly')
.scrolly({
speed: 1500,
offset: $header.outerHeight()
});
// Menu.
$('#menu')
.append('<a href="#menu" class="close"></a>')
.appendTo($body)
.panel({
delay: 500,
hideOnClick: true,
hideOnSwipe: true,
resetScroll: true,
resetForms: true,
side: 'right',
target: $body,
visibleClass: 'is-menu-visible'
});
// Header.
if (skel.vars.IEVersion < 9)
$header.removeClass('alt');
if ($banner.length > 0
&& $header.hasClass('alt')) {
$window.on('resize', function() { $window.trigger('scroll'); });
$banner.scrollex({
bottom: $header.outerHeight() + 1,
terminate: function() { $header.removeClass('alt'); },
enter: function() { $header.addClass('alt'); },
leave: function() { $header.removeClass('alt'); }
});
}
});
var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
if (!iOS) {
new Popper(document.querySelector('.menuToggle'), document.getElementById('title-popper'));
} else {
document.getElementById('title-popper').remove();
}
var learnMore = document.querySelector('#tooltip-learn-more');
learnMore && new Tooltip(learnMore, {
title: 'You really should 🔥',
container: learnMore.parentNode,
})
})(jQuery);