If I add an event (to a div for example) with js, it replaces the
event if there already is one. How can I add instead of replace this?
Example:
<body onLoad="testDiv .onmouseover =
(function(event ){alert('helloA gain')});">
<div id="testDiv" onMouseOver="al ert('hello');"> JaJa!</div>
</body>
Here the alert('hello') is replaced with alert('helloAga in'). And I
don't want that! I want both events.
Anybody have a clever approach to this problem?
event if there already is one. How can I add instead of replace this?
Example:
<body onLoad="testDiv .onmouseover =
(function(event ){alert('helloA gain')});">
<div id="testDiv" onMouseOver="al ert('hello');"> JaJa!</div>
</body>
Here the alert('hello') is replaced with alert('helloAga in'). And I
don't want that! I want both events.
Anybody have a clever approach to this problem?
Comment