开发者

jquery get css property font-weight returning number instead of 'bold' in IE

I'm trying to get the font-weight of a property using latest jquery, doe开发者_如何学Pythonsn'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.


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'.


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') {
...
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜