Change Text Size OnClick

Provide visitors to your site the option of increasing or decreasing the size of text onclick using JavaScript. The FontSize Change JavaScript provides that option yet allows you, the page designer, to control which portions of your layout can have text size adjusted and how much.

Try the text size buttons on the right to see how the code works on this page. The examples listed on the right demonstrate different ways the code can be set up. The documentation includes information to help you choose the appropriate example for your purposes. A download file contains these examples.

Benefits and Features

FontSize Change JavaScript provides a uniform, readily available means of adjusting text size rather than expecting users to find the varying browser provided mechanisms for doing so. User font-size preference will be held in a cookie for future visits to the site or visits to other pages in the site that use the code. Text size can be preselected for users with particular needs and passed in the URL.

The documentation includes basic setup information as well as guidance in the use of methods that provide precise control over font size adjustment in your documents so as not to break your layout.