+ 6
WHY DOESN'T SWAL WORK[SOLVED]
I don't know why but swal doesn't work for me😥 First time trying swal(sweet alert) Please tell me what I am doing wrong https://code.sololearn.com/W4OkC7R20W99/?ref=app
12 odpowiedzi
+ 7
Atomic Wave ~⚛ Your code logs an error message of "swal" is not defined because you have put the script tag in body, so it is not loaded before the code in JS tab runs.
Then, because your swal() is in DOMContentLoad event listener, instead of window load event listener, so swal() runs before the library is imported.
ααdítчα ❣️ Your demo works. Just one more point to note: The url from SweetAlert Documentation is a generic one without version, so when they change the syntax later, the code may crash, so it is better to specify the version to import. The url to import a specific version is actually in the sentence above the url textbox, here is my video explaining SweetAlert for your reference:
https://youtu.be/ZKj0QrrQ6fw
We can customize the buttons, read the button clicked, add textbox to modal box, use image as icon, and style the SweetAlert Modal Box, I have introduced ways in my above video, hope it helps.
+ 4
@aadiyta
What did you change???
+ 3
Remove java script ;-;
+ 3
+ 3
ααdítчα ❣️
but both are same...
And the output is not same..
!?!?!?!?!?
I did not mean that you have copied...
I m saying that both codes are same and output it different..
+ 3
+ 2
I think there might be a problem with the COMPILER because both codes , from ααdítчα ❣️ and Atomic Wave ~⚛ are same..
If you face such problems , you can connect to SL via Discord or any other social platform...
0
YOU ARE STUPID