Charlie McShane Charlie McShane - 7 months ago 66
HTML Question

SCRIPT5009: '$' is undefined for IE only - jQuery is already installed

Trying to build a heatmap on Google Maps via Yeoman. It works totally fine in all other browsers apart from IE. Does not function in IE 10 all the way to Edge. Edge doesn't throw an error, but it doesn't work.

Error is the standard '$' is undefined:

SCRIPT5009: '$' is undefined

I have jQuery installed into the
and alongside the scripts at the bottom just incase there are any scripts running before jQuery, but I'm having no luck what-so-ever. Any ideas why?




Basically, I'm an idiot. I was placing the jquery script inside this section of the head tag:

<!-- build:js scripts/vendor/modernizr.js -->
<script src="/bower_components/modernizr/modernizr.js"></script>
<!-- endbuild -->

This means the jquery was being removed during the 'gulp-build' process.

Sorry for the time-wasting here guys! Charlie