makeee
makeee

Reputation: 2815

Detect mouse over iframe?

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?

Upvotes: 5

Views: 12480

Answers (2)

kendra
kendra

Reputation: 1

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

Upvotes: -1

Felix
Felix

Reputation: 89596

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.

Upvotes: 3

Related Questions