Javascript button that will make text smaller and bigger by pressing it?

Question by ERIK S: Javascript button that will make text smaller and bigger by pressing it?
What up everybody, OK well pretty much I’m putting a website up and I wanted to know how or where I can get a Javascript that will make the text bigger or smaller when you press the button. I went to most of the popular sites that support javascript but I can’t seem to find it. Does anyone have the snippet code by any chance. Thanks.

Best answer:

Answer by arus.geo
Dhtml and CSS does this
http://www.alistapart.com/articles/relafont

Add your own answer in the comments!

No related content found.

Revisions

There are no revisions for this post.

Tags: , , , , ,

2 Responses to “Javascript button that will make text smaller and bigger by pressing it?”

  1. Jake Cigar October 3, 2011 at 8:35 PM #

    all you have to do is modify the class of the body of the html to use a larger font
    something like
    document.body.setAttribute (“class”, “bigger”);

    where bigger is defined in css as
    bigger { font-size: 200%; }
    .

  2. Best Helper October 3, 2011 at 8:41 PM #

    i have not learn java yet but i know action script @ begineer c++ so here what i would do

    var tittle;
    tittle.onRollOver = function(){
    tittle._xscale = tittle._yscale = 200;
    }

    tittle.onRollOut = function(){
    tittle._xscale = tittle._yscale = 100;
    }

Leave a Reply