I'm getting an Error:
"Uncaught ReferenceError: $ is not defined"
when trying to use $('#someid')
within my custom js code within an electron app.
The scripts are in the correct order in my html file:
<script type="text/javascript" src="assets/js/jquery.min.js"></script>
<script type="text/javascript" src="assets/js/popper.js"></script>
<script type="text/javascript" src="bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="mymidi.js"></script>
This happens if i attempt to use on one of the first lines of mymidi.js
:
console.log($('#mappingnotify').innerText);
or for an event that is created later during a dom-element creation:
function pickdev(){...
midiinput.on('noteon',function(msg){
...
$('#mappingnotify').modal('show');
...})}
the strange thing is it seems to work correctly from the console:
console.log($('#mappingnotify').innerText);
Output:
VM113:1
kalsjhdf
Cancel
So to me, it seems that it has something to do with $
not being loaded when called... but I'm at a loss as to what, or how to fix it.