I'd like call a function every time a user drags their mouse over an iframe (which points to a different domain). Is this possible?
Asked
Active
Viewed 1.2k times
5
-
Possible duplicate of http://stackoverflow.com/questions/2381336 – Sharjeel Aziz Jun 03 '10 at 18:28
2 Answers
3
I'm guessing you already tried setting a mouseover
event on the actual iframe
and it didn't work. If so, you can try wrapping the iframe
inside a div
and set the mouseover
event on that div
. This has to work. In the worst case scenario make the div
a little big bigger (1-2px padding) than your iframe.

Felix
- 88,392
- 43
- 149
- 167
-
I am using this technique to change the color of a text. It works fine on Firefox but on IE when the mouse is over the iFrame it considers the hover over the div is over and the text returns to the original colors. Any ideas? – antf Nov 09 '14 at 13:01