2017-04-11 14:47:39 -07:00
|
|
|
// TODO register these individually with window resize use self callled function
|
2017-04-10 15:15:14 -07:00
|
|
|
function resizeElements() {
|
2017-04-05 00:24:28 -07:00
|
|
|
navbarSpacer();
|
2017-04-19 14:10:18 -07:00
|
|
|
$('.box--embed iframe').fitToWindow()
|
|
|
|
$('.box--image img').fitToWindow()
|
2017-03-10 22:59:27 -08:00
|
|
|
heroResize();
|
2017-03-21 08:32:26 -07:00
|
|
|
typeResize(); // for section content
|
2017-04-10 15:15:14 -07:00
|
|
|
$('.section__content--modal').perfectScrollbar('update');
|
2017-04-11 14:47:39 -07:00
|
|
|
$('.nav-bar__menu').perfectScrollbar('update');
|
|
|
|
$('.code').perfectScrollbar('update');
|
2017-04-10 15:15:14 -07:00
|
|
|
};
|
|
|
|
|
2017-04-11 14:37:42 -07:00
|
|
|
function initialize() {
|
|
|
|
hljs.initHighlightingOnLoad();
|
|
|
|
$('.section__content--modal').perfectScrollbar();
|
2017-04-11 14:47:39 -07:00
|
|
|
$('.nav-bar__menu').perfectScrollbar();
|
|
|
|
$('code').perfectScrollbar('update');
|
2017-04-11 14:37:42 -07:00
|
|
|
resizeElements()
|
|
|
|
};
|
|
|
|
|
|
|
|
initialize();
|
2017-04-05 00:24:28 -07:00
|
|
|
|
2017-04-08 14:24:15 -07:00
|
|
|
// requires jquery
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
2017-04-11 14:37:42 -07:00
|
|
|
// bind resize events
|
|
|
|
$(window).resize(function () {
|
|
|
|
resizeElements()
|
|
|
|
});
|
|
|
|
|
2017-04-08 14:24:15 -07:00
|
|
|
});
|