simple font resize function not working in IE
hi
i have a simple font size function as follows which works fine across safari/firefox but does nothing in IE?
code as follows:
- // Reset Font Size
- var originalFontSize = $('#pageContent').css('font-size');
- $('#reset').bind('click',function() {
- $('#pageContent').css('font-size', originalFontSize);
- });
- // Increase Font Size
- $('#larger').bind('click',function() {
- var currentFontSize = $('#pageContent').css('font-size');
- var currentFontSizeNum = parseFloat(currentFontSize, 10);
- var newFontSize = currentFontSizeNum*1.2;
- $('#pageContent').css('font-size', newFontSize);
- return false;
- });
- // Decrease Font Size
- $('#smaller').bind('click',function() {
- var currentFontSize = $('#pageContent').css('font-size');
- var currentFontSizeNum = parseFloat(currentFontSize, 10);
- var newFontSize = currentFontSizeNum*0.8;
- $('#pageContent').css('font-size', newFontSize);
- return false;
- });