Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which DOM events can be bound to a DIV element?

Tags:

As per question in the title...

like image 557
RedDragon Avatar asked Sep 02 '11 13:09

RedDragon


2 Answers

There's a complete list of DOM events here, which includes browser-specific and touch-interface events as well. All the Mouse and Keyboard events can be attached to a div, which are:

mousedown, mouseup, mouseover, mousemove, mouseout, click, dblclick, keydown, keypress, keyup

like image 107
Richard H Avatar answered Nov 24 '22 01:11

Richard H


There are various events which can be performed on div tags such as

ondrag, ondragcenter, ondragleave, ondrop, ondragover, ondragstart, ondragend, onscroll  
like image 36
GSGupta Avatar answered Nov 23 '22 23:11

GSGupta