And this error appears in the running log in the terminal:
Running "jshint:all" (jshint) task
Linting assets/js/_main.js ...ERROR
[L5:C22] W117: 'ParallaxScroller' is not defined.
var parallaxer = new ParallaxScroller();
Warning: Task "jshint:all" failed. Use --force to continue.
Aborted due to warnings.
How should JS be called in the _main.js file? I do not fully grok the example in the URL in the comments and there are no examples in any of the Roots documentation.
First off, you don’t want $(document.ready() in the home init function, it’s not necessary.
Second, you are calilng ParallaxScroller, but jslint does not see it. If you check out the JSHint docs: http://www.jshint.com/docs/ , you can add a variable that is in a previous file so that JSHint will not error out when it cannot find it within that particular file. So you can add ParallaxScroller to the .jshint “globals”. That should work better.
Well unfortunately not always It’s more because they could use different coding styles (such as leaving semi-colons) and since it’s 3rd party you should technically leave it as is instead of modifying the source.