Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Event question and finding pointer position at event
- From: sclay at ufl.edu (Steve Clay)
- Subject: [Javascript] Event question and finding pointer position at event
- Date: Tue Mar 28 13:54:13 2006
Tuesday, March 28, 2006, 2:42:26 PM, Bill Moseley wrote: > I always think of bubbling up or capturing, but not bubbling down. Sorry, poor usage on my part. I was thinking down because child elements usually display on top of their parents, but events do bubble (as bubbles do) /up/ the DOM tree. Here was the page I should have referred to: http://www.quirksmode.org/js/events_mouse.html#mouseover In your case you can either worry about stopping propagation on every child element, or store the state in a property: myDiv.onmouseover = function() { if (this.isAlreadyMousedOver) return false; // do stuff here this.isAlreadyMousedOver = true; } myDiv.onmouseout = function() { this.isAlreadyMousedOver = false; // do stuff here } Steve -- http://mrclay.org/
- Follow-Ups:
- [Javascript] Event question and finding pointer position atevent
- From: Troy III Ajnej
- [Javascript] Event question and finding pointer position at event
- From: Bill Moseley
- [Javascript] Event question and finding pointer position atevent
- References:
- [Javascript] Event question and finding pointer position at event
- From: Bill Moseley
- [Javascript] Event question and finding pointer position at event
- From: Triche Osborne
- [Javascript] Event question and finding pointer position at event
- From: Steve Clay
- [Javascript] Event question and finding pointer position at event
- From: Bill Moseley
- [Javascript] Event question and finding pointer position at event
- Prev by Date: [Javascript] Event question and finding pointer position at event
- Next by Date: [Javascript] Event question and finding pointer position atevent
- Previous by thread: [Javascript] Event question and finding pointer position at event
- Next by thread: [Javascript] Event question and finding pointer position atevent
- Index(es):