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: wdlists at triche-osborne.com (Triche Osborne)
- Subject: [Javascript] Event question and finding pointer position at event
- Date: Tue Mar 28 10:39:46 2006
Bill Moseley wrote: > [This was redirected from "thelist" at evolt.org -- sorry for those > on both lists] > > > I have two questions. One is why events are firing when moving a > mouse *within* a <div> when the events are on mouseover and mouseout on > just the div . . . > I have a theory about this. I noticed the same behavior while I was playing around with JS--not building a specific app, IIRC, just testing out possibilities for future reference. I meant to post a question about it, but got sidetracked into building some server-side applications for a client and forgot about it until Bill triggered the memory. Anyway I found the behavior puzzling, but I noticed one other thing about it that made me think about what was going on: The mouseover behavior fired whenever you moved the mouse within the DIV. As long as the mouse was still, nothing happened. If you moved it, it fired for each move. I'm thinking it means that "onmouseover" means quite literally what it says: Any time the mouse moves over the element, it fires. This implies movement *within* the element as well as over it's boundaries, which is more what I was hoping for. I could be wrong about this, and if so, I'm sure my JS elders and betters will correct me ;-), but it seems a logical assumption from the behavior I witnessed. Triche Osborne
- Follow-Ups:
- [Javascript] Event question and finding pointer position at event
- From: Steve Clay
- [Javascript] Event question and finding pointer position at event
- References:
- [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] in need of pointers...
- Next by Date: [Javascript] Event question and finding pointer position at event
- Previous by thread: [Javascript] Event question and finding pointer position at event
- Next by thread: [Javascript] Event question and finding pointer position at event
- Index(es):