I have been search for how to add css rules to elements inide an iframe
. On most of the SO posts they get the inner elements of iframe tag as:
$("iframe").contents().find("body");
My question is why can't I select the body
element inside the iframe
as:
$("iframe body");
AFAIK contents
jquery method searches for all the text nodes. But isn't body
tag an element node? Please explain.