K2, while awesome is complicated and it's got a few things that are annoying. And by annoying I mean the programmers decided what they thought looked good and I don't always agree. Like making the intro text bold. The font enlarger is a cool feature and it helps my 100-year-old godmether build better joomla sites, but it doesn't work on the intro text, so here's how to fix it:
1. Go to your file directory and open the file: /components/com_k2/js/k2.js
2. Look for the Text Resizer section of the code (around line 31) and make this change:
Change this:
// Text Resizer
if ($('fontDecrease')) {
$('fontDecrease').addEvent('click', function(e){
new Event(e).stop();
$$('.itemFullText').removeClass('largerFontSize');
$$('.itemFullText').addClass('smallerFontSize');
});
}
if ($('fontIncrease')) {
$('fontIncrease').addEvent('click', function(e){
new Event(e).stop();
$$('.itemFullText').removeClass('smallerFontSize');
$$('.itemFullText').addClass('largerFontSize');
});
}
To this:
// Text Resizer
if ($('fontDecrease')) {
$('fontDecrease').addEvent('click', function(e){
new Event(e).stop();
$$('.itemIntroText').removeClass('largerFontSize');
$$('.itemFullText').removeClass('largerFontSize');
$$('.itemIntroText').addClass('smallerFontSize');
$$('.itemFullText').addClass('smallerFontSize');
});
}
if ($('fontIncrease')) {
$('fontIncrease').addEvent('click', function(e){
new Event(e).stop();
$$('.itemIntroText').removeClass('smallerFontSize');
$$('.itemFullText').removeClass('smallerFontSize');
$$('.itemIntroText').addClass('largerFontSize');
$$('.itemFullText').addClass('largerFontSize');
});
}
3. Now you can check the frontend to make sure the font resizer works for both the introtext and fulltext.
4. To change the smaller and larger font sizes, open the file: /components/com_k2/css/k2.css
5. Scroll down a bit (or do a code search) and find the classes: .smallerFontSize and .largerFontSize
6. Change these to whatever font sizes suit your needs.
