Is there an effective way to add a CSS rule to an iframe using jQuery? I attempted to use the standard css()
method as shown below:
$("iframe>body").css("font-family", "Tahoma");
Unfortunately, this approach did not produce any results. It seems like this code might be adding an inline style tag to the iframe body, but it's not working as intended. I also tried using pure CSS:
iframe>body
{
font-family: Tahoma !important;
}
However, this method also did not work for me.
I am wondering if there is something wrong with my code. Any assistance would be greatly appreciated!