0
Nothing happens?
This is my first time using J̛͜͢Qu͏ȩ̴r̨̛y͘ can someone help me with the code. I want it to alert when the user uses í̶̸̧͜o̸͝s̨͘͟͜͞ device and i want it to alert something else if any other device. I also want the background gif to appear when switch toggled on. https://code.sololearn.com/WdMtYPX1stHd/?ref=app
3 Respuestas
+ 4
just saying, using jQuery and JavaScript in the same code would sometimes confuse people reading your code, for example you used window.onload you could use jQuerys equivalent
$(document).ready(function(){
// your code to run when the page loads
});
and line 15, instead of document.getElementById() you can use
var elem = $("#myElement");
which does the same thing...I could keep going but those are just a couple tips
+ 2
🅿️®️⭕️_e✖️e ,First of all, you are not to use double Window.onload
+ 1
Mystique is right plus there is a 'while' statement in your script that will never evaluate to true as the script stands now.
https://code.sololearn.com/WBjfKt5QTBoV/#js