I am having issues with this:
HTMLCode:$(document).ready(function(){ var section = new Array('copy-content'); section = section.join(','); // Reset Font Size var originalFontSize = $(section).css('font-size'); $(".resetFont").click(function(){ $(section).css('font-size', originalFontSize); return false; }); // Increase Font Size $(".increaseFont").click(function(){ var currentFontSize = $(section).css('font-size'); var currentFontSizeNum = parseFloat(currentFontSize, 10); var newFontSize = currentFontSizeNum*1.2; if (newFontSize < 16) { $(section).css('font-size', newFontSize); } return false; }); // Increase Font Size $(".increaseFont-more").click(function(){ var currentFontSize = $(section).css('font-size'); var currentFontSizeNum = parseFloat(currentFontSize, 10); var newFontSize = currentFontSizeNum*1.35; if (newFontSize < 18) { $(section).css('font-size', newFontSize); } return false; }); });
It works.....but when you click on increaseFont (good) and click after increaseFont-more, it wont functionCode:<li><a href="#" class="normal resetFont">A</a> | <a href="#" class="zoom-in increaseFont">A</a> | <a href="#" class="zoom-more increaseFont-more">A</a></li>
...resetFont works (resets back to normal) ...
....but cannot go bigger with increaseFont-more and vice-versa if Im in increaseFont already.....only resetFont will work....what am I missing?
Thanks


Reply With Quote
Bookmarks