tags:

views:

28

answers:

2

how to set a bigger font size using jquery for the whole page?

+1  A: 

It's not fool-proof and for all scenarios, but as close as you could get (without getting much more complicated) would be setting the font-size or zoom, like this:

$("body").css("font-size", "2em");
//or:
$("body").css("zoom", "2");
Nick Craver
A: 

I typically do something like


var $scale = $("<div>").attr("id", "scale").css("font-size", "120%");
$("body").wrapInner($scale);

as this give a little more control than directly altering body and allows you to revert back to the original size a bit easier. You can also extend this with classes and CSS definitions for switching between different sizes pretty easily.

MPD