//Faster script execution, might shave a few ms by putting things here instead! /* * Load dynamic images as fast as possible. * Reason: Before the img is loaded, the figure element tries to simulate the oncoming image height. * Problem solved: Website jumps when figure gains height too late. (from zero to img height) * Success rate: Much! *******************************************************************/ if(typeof sircon.funcs.loadDynamicImages !== 'undefined'){ sircon.funcs.loadDynamicImages(); }else{ console.log('sircon.funcs.loadDynamicImages() not loaded!'); } /* * Content specific width-indicator * Reason: Add css-classes as media-widths * Problem solved: Elements gain their width-specific styles late, and we produce an unpleasant fouc * Success rate: Slight fouc if depending 100% on this during first page load. Note to self: Use media queries AND this. *******************************************************************/ if(typeof sircon.plugins.mediaQueryElement !== 'undefined'){ sircon.objects.mediaQueryElement = []; }else{ console.log('sircon.plugins.mediaQueryElement() not loaded!'); } /* * Select boxes with custom styling! * Reason: Another tiny local, but visible fouc we might want to target earlier. * Problem solved: Select box looks like select box then poof custom select box. * Success rate: *******************************************************************/ if(typeof jQuery.fn.customSelect !== 'undefined'){ jQuery('select').customSelect(); }