5

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?

makeee
  • 2,765
  • 5
  • 35
  • 42

2 Answers2

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
-1

Load a file into the iframe set the mouseover event on that file.

kendra
  • 1