Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

html ondragout event?

Tags:

html

events

I have a table that will contain elements dragged into each cell by the user.

<td ondrop="dropIt(event);" ondragover="dragOver(event)" onMouseOver="this.bgColor='grey';" onMouseOut="this.bgColor='white';"></td>

When the user mouses over a cell, I want it to turn grey. When the mouse exits the cell i want it to turn white again.

Likewise, when a user drags an element over a cell, i want it to turn grey. The problem i'm having is turning it white again after the user moves to another cell. Is there some kind of ondragout event in html ?

Thanks

like image 922
Sherlock Avatar asked Jan 20 '13 10:01

Sherlock


People also ask

What is the functionality of Ondragover () event?

The ondragover event occurs when a draggable element or text selection is being dragged over a valid drop target. By default, data/elements cannot be dropped in other elements. To allow a drop, we must prevent the default handling of the element. This is done by calling the event.

What is Dragover event?

The dragover event is fired when an element or text selection is being dragged over a valid drop target (every few hundred milliseconds). The event is fired on the drop target(s).

Which event is triggered when a draggable object is moved inside an element?

The drag event is fired every few hundred milliseconds as an element or text selection is being dragged by the user.


1 Answers

Sorry for the stupid question ! I just found the ondragleave event.

Thanks

like image 56
Sherlock Avatar answered Oct 02 '22 19:10

Sherlock