I’m having a difficult time trying to figure out exactly what’s wrong with my code. I’ve installed enquire.js by putting the uncompressed enquire.js code into assets/plugins and also putting '!assets/js/plugins/enquire.js'
into the Gruntfile.js to ignore the third party file for errors.
However, my problem lies within trying to call enquire (and other functions) within the _main.js file, even outside of the var ExampleSite = {
wrapper.
I keep getting errors like the following:
[L12:C1] W117: 'enquire' is not defined. enquire.register("screen and (max-width:767px)", {
from the jshint:all task
Where am I supposed to be putting these function calls? I was able to add my function call to the enquire.js file itself, after the library code… but that’s sort of hackish to me and messy.
I’m just wondering what the best way to include code, ideally within that fancy body_class JavaScript wrapper.