Reputation: 1765
I'm trying to implement this JQuery Font Size Changer from:
http://simplersolutions.biz/font-resizer
To my website. I got it working with one problem. I need it to stop increasing when the font is 20px. The script allows overides.
I've added:
//bind increases
$('.' + opts.defaultIncreaseClass).click( function() {
$.fn.fontResize.reSize(true, '20px');
return false;
});
// bind decreases
$('.' + opts.defaultDecreaseClass).click( function() {
$.fn.fontResize.reSize(false,'10px');
return false;
});
In the above example, The Bind Decrease works but and stops font from going below 10px but the bind increase doesn't work.
This is the original function we are overriding:
// bind increases
$('.' + opts.defaultIncreaseClass).click( function() {
$.fn.fontResize.reSize(true);
return false;
});
// bind decreases
$('.' + opts.defaultDecreaseClass).click( function() {
$.fn.fontResize.reSize(false);
return false;
});
Anyone know why the override is missing? The link mentioned has information on the code. Thanks a lot!
Upvotes: 0
Views: 179