JSFiddle - React, Tailwind, and code Playground
by zalog
JavaScript
"use strict";
/* vars
*******************************************************************************************************/
var previousScrollTop = 0,
currentScrollTop = ( window.pageYOffset !== undefined ) ? window.pageYOffset : ( document.documentElement || document.body.parentNode || document.body ).scrollTop,
isScrolling = false;
/* css
*******************************************************************************************************/
/*var cb = function() {
var l = document.createElement('link'); l.rel = 'stylesheet';
l.href = 'css/style.css';
var h = document.getElementsByTagName('head')[0]; h.parentNode.insertBefore(l, h);
};
var raf = requestAnimationFrame || mozRequestAnimationFrame || webkitRequestAnimationFrame || msRequestAnimationFrame;
if (raf) raf(cb);
else window.addEventListener('load', cb);*/
/* google font
*******************************************************************************************************/
var WebFontConfig = {
google: { families: [ 'Arimo:400,700&subset=latin-ext' ] }
};
(function() {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') + '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})();
/* Colorbox - https://github.com/jackmoore/colorbox
**********************************************************************/
$.colorbox.settings.previous = "<i class=\'icon-left\'></i>";
$.colorbox.settings.next = "<i class=\'icon-right\'></i>";
$.colorbox.settings.close = "<i class=\'icon-close\'></i>";
$.colorbox.settings.slideshowStart = "play";
$.colorbox.settings.slideshowStop = "stop";
$.colorbox.settings.initialWidth = "100%";
$.colorbox.settings.initialHeight = "100%";
$.colorbox.settings.opacity = 1,
$.colorbox.settings.fixed = true;
$(document).bind('cbox_load',...