var fontSize = $(this).attr('style',function(i,s){ return s.replace(/font-size:/s*(/d+.{0,1}/d*)/, function(a){ return a + 'px'; }); }); //console.debug("font-size: "+ $(this).attr('style').match(/(?:font-size:)s*(/d+.{0,1}/d*)/));
var style = $(this).attr('style'); var fontSize = $(this).css('font-size',function(){ var s = style.match(/(?:font-size:)s*(/d+.{0,1}/d*)/)[0].replace(/font-size:/,''); return s; });