Detect mouse over iframe?

I would like to call a function every time a user drags his mouse over an iframe (which points to a different domain). Is it possible?

+4
source share
2 answers

I assume that you have already tried to set the mouseover event in the actual iframe , and that did not work. If so, you can try wrapping the iframe inside a div and setting the mouseover event to a div . It has one . In the worst case, make the div bit bigger (1-2px padding) than your iframe.

+2
source

Download the file in an iframe, set the mouseover event to this file.

0
source

Source: https://habr.com/ru/post/1311773/


All Articles