0

I can get css of an element in an iframe by this way:

var bg_color = $('iframe.#myIframe').contents().find('div#someId').css('background-color');

but I can't get:

var bg_color = $('iframe.#myIframe').contents().find('div#someId:hover').css('background-color');

So, how can I get css of a hover element in an iframe (same domain)? Please help me! Thanks!

1 Answers1

-1

This cannot be done, the iFrame is literally a window to another webpage, therefor it is not in your DOM, and not accessible by your jquery

A_funs
  • 1,228
  • 2
  • 19
  • 31