Index: trunk/extensions/WebFonts/js/webfonts.js |
— | — | @@ -58,9 +58,12 @@ |
59 | 59 | //scale the font of the page. Scale is in percentage. |
60 | 60 | // For example scale = 1.2 means scale the font by 120 percentage |
61 | 61 | if ( 'scale' in config ) { |
62 | | - $.webfonts.scale("body", config.scale); |
| 62 | + $.webfonts.scale(config.scale); |
63 | 63 | } |
64 | | - |
| 64 | + else{ |
| 65 | + $.webfonts.scale(1); |
| 66 | + } |
| 67 | + |
65 | 68 | if ( 'normalization' in config ) { |
66 | 69 | $(document).ready(function() { |
67 | 70 | $.webfonts.normalize(config.normalization); |
— | — | @@ -86,14 +89,10 @@ |
87 | 90 | |
88 | 91 | /** |
89 | 92 | * Scale the font of the page by given percentage |
90 | | - * @param selecter CSS selector |
91 | 93 | * @param percentage of scale. eg 1.2 for 120% scale |
92 | 94 | */ |
93 | | - scale : function (selecter, percentage){ |
94 | | - $(selecter).each(function(i) { |
95 | | - var currentSize = parseInt($(this).css("font-size")); |
96 | | - $(this).css("font-size", Math.round( currentSize * percentage)); |
97 | | - }); |
| 95 | + scale : function (percentage){ |
| 96 | + $("p,li,h1,h2,h3,h4,h5,textarea,input").css('font-size', percentage + "em"); |
98 | 97 | }, |
99 | 98 | |
100 | 99 | /** |