0
How to use a conditional with the empty method
Hello entrepreneurs, receive a cordial greeting from me. I am making a code that consists of dragging a paragraph and dropping it on an <div> element. Now what I need is that when I perform this event, an alert is displayed confirming the event. https://code.sololearn.com/Wb0J5wPOLcU3/?ref=app
2 Réponses
0
You can try creating a boolean variable that evaluates to true when your event is completed and a then a condition that checks when that variable is equal to true.
if(it happens) {
iscomplete = true;
}
if(iscomplete=true) {
alert("drag and drop succesfully completed") ;
}
you can add some other stuff, its your code...
0
Holger Edud Angulo Castillo
You can add an alert statement inside your drop() function.