Setting non-blocking minify JS causes RoyalSlider to break
-
Seems quite a common issue after Googling, but here’s my issue anyway.
I only have Minify turned on, and is set to auto.
When JS settings is set to default (blocking), the RoyalSlider on the homepage works fine.However, any other setting (non-blocking by JS, async or defer) will cause the slider to just show a black space, along with the dreaded console error: Uncaught ReferenceError: jQuery is not defined
In the footer where the JS file is, directly below it is the initiation script for the slider, so it seems that somewhere in the minified JS File, the jQuery call is being knocked out.
<script type="text/javascript" src="https://www.origin-psychics.com/wp-content/cache/minify/2fb2f.js"></script> <script id="new-royalslider-init-code" type="text/javascript"> jQuery(document).ready(function($) { $('.new-royalslider-1').royalSlider({template:'default',image_generation:{lazyLoading:!0,imageWidth:'',imageHeight:'',thumbImageWidth:'',thumbImageHeight:''},thumbs:{thumbWidth:96,thumbHeight:72},autoPlay:{enabled:!0,delay:5000,stopAtAction:!1},block:{moveOffset:20,speed:400,delay:200},width:'100%',height:'',autoScaleSlider:!0,autoScaleSliderWidth:4,autoScaleSliderHeight:1,slidesSpacing:0,imageScaleMode:'fill',imageScalePadding:0,transitionType:'fade',transitionSpeed:1000,loop:!0,randomizeSlides:!0}); }); </script>
Site in question is https://www.origin-psychics.com – Is there anything I can do here?
- The topic ‘Setting non-blocking minify JS causes RoyalSlider to break’ is closed to new replies.