I didn't see you posted azn example page. When testing it, I found that both Opera and Chromium returned the correct thing but they format it differently. Opera alerts "Comic Sans MS [microsoft]". I actually like how Opera alerts the font you're actually using instead of the whole font stack, this is way more useful information in most cases.

I didn't test in IE, but I guess this is a bug in Firefox.

Jonathan

Jonathan Vanherpe (T & T nv) wrote:
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

Reply via email to