$ (document). Ready (function () {
Reset the font size (back to default)
var originalfontsize = $ (' html '). CSS tutorial (' font-size ');
$ (". Resetfont"). Click (function () {
$ (' HTML '). CSS (' font-size ', originalfontsize);
});
Increase the font size (bigger font0
$ (". Increasefont"). Click (function () {
var currentfontsize = $ (' html '). CSS (' font-size ');
var currentfontsizenum = parsefloat (currentfontsize, 10);
var newfontsize = currentfontsizenum*1.2;
$ (' HTML '). CSS (' font-size ', newfontsize);
return false;
});
Decrease the font size (smaller font)
$ (". Decreasefont"). Click (function () {
var currentfontsize = $ (' html '). CSS (' font-size ');
var currentfontsizenum = parsefloat (currentfontsize, 10);
var newfontsize = currentfontsizenum*0.8;
$ (' HTML '). CSS (' font-size ', newfontsize);
return false;
});
});
Column height is the same
$ (document). Ready (function () {
function Equalheight (group) {
tallest = 0;
Group.each (function () {
Thisheight = $ (this). Height ();
if (Thisheight > tallest) {
tallest = Thisheight;
}
});
Group.height (tallest);
}
How to use
$ (document). Ready (function () {
Equalheight ($ (". Left"));
Equalheight ($ (". Right"));
});
});