JQuery, 'Hammer is not defined'


#1

So, I’m trying to use JQuery with Electron which is really more hassle than it should be. I’ve added Materializecss and I’ve done

<script>
		window.$ = window.jQuery = require('./js/jquery.min.js')
		window.Hammer = require('./js/hammer.min.js')
</script>

inside my index.html, but I’m still getting “$” and “Hammer not defined”, any reason why?


#2

Maybe because you have placed these definitions after your app. I have been able to successfully use materialize with the same code, but this script tag needs to be at the top, before you reference any other scripts