gpccaor-deployed/js/docready.js

32 lines
784 B
JavaScript
Raw Normal View History

2021-10-30 07:52:57 -07:00
// TODO register these individually with window resize use self callled function
function resizeElements() {
navbarSpacer();
$('.box--embed iframe').fitToWindow()
$('.box--image img').fitToWindow()
heroResize();
typeResize(); // for section content
$('.section__content--modal').perfectScrollbar('update');
$('.nav-bar__menu').perfectScrollbar('update');
$('.code').perfectScrollbar('update');
};
function initialize() {
hljs.initHighlightingOnLoad();
$('.section__content--modal').perfectScrollbar();
$('.nav-bar__menu').perfectScrollbar();
$('code').perfectScrollbar('update');
resizeElements()
};
initialize();
// requires jquery
$(document).ready(function () {
// bind resize events
$(window).resize(function () {
resizeElements()
});
});