does every browser do that?
jordanrynard wrote:
I'm trying to retrieve the current font from an element that is within an
iframe... unsuccessfully.
From within the document itself I can retrieve the font just fine using the
following:
$(document).ready(function(){
var getFontFamily = $("#get_font_of_this").css("font-family");
alert(getFontFamily);
});
-- returns (Comic Sans MS, cursive)
But once I try retrieving the same element's font from a parent document as
shown below, I do not get the expected response:
$(document).ready(function(){
$("#iframe").load(function(){
var getFontFamily =
$("#iframe").contents().find("#get_font_of_this").css("font-family");
alert(getFontFamily);
});
});
-- returns (serif)
I can seemingly retrieve any other css property through this method, but for
some reason the font returns as a default (serif), or sometimes (Arial, ...,
serif)
If anyone can shed some light on this issue, I will be indebted to you.
Thanks in advance!
Example page can be found at http://www.arcadiasitedesign.com/page1.php
http://www.arcadiasitedesign.com/page1.php
--
Jonathan Vanherpe - Tallieu & Tallieu nv - jonat...@tnt.be