tags:

views:

19

answers:

2

I'm trying to get the font-weight of a property using latest jquery, doesn't work in IE somehow... on IE dev toolbar console -

$('#ctl00_ContentPlaceHolder1').css('font-weight')

returns

700 !

I checked in the source... can't see any problems with the style formatting. Works in FF.

+1  A: 

Nothing out of the ordinary there, as bold is synonymous with 700.

http://www.w3.org/TR/CSS2/fonts.html#font-boldness

The font labeled "Bold" will often correspond to the weight value '700'.

Jason Lewis
A: 

ye, just realised that.. think jQuery should return the same value tho across browsers... I'm using this now

...
fontWeight = $(this).css('font-weight');
if (fontWeight == 'bold' || fontWeight == '700') {
...
Brandon
Welcome to Stackoverflow. FYI, This'd be more a comment than an answer.
aharon
ye I thought so too.. but can I put a code block in comment? If not, will seem messy.
Brandon