PDA

View Full Version : Document Text Sizer question



Dott
09-06-2007, 08:01 AM
1) Script Title: Document Text Sizer

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex9/textsizer.htm

3) Describe problem: Hello! I'm new here and sorry me for my english but isn't my native language. I've included the Document Text Sizer script on my site, and all works fine except one detail.

I've the same code piece many times on one page, and when I tried to increase or decrease the text, only the first part of the text affected by the code is increased or decreased.

For example:


<div id="article">text</div>
<div id="article">text</div>
<div id="article">text</div>


The link to increase will be


<a href="javascript:ts('article',1)">Bigger</a>

In textsizer.js...


//Specify affected tags. Add or remove from list:
var tgs = new Array('article');

The problem is that only the first part of the text affected by div id article increase the font size. The rest of the text don't do it.

Anyone know a solution to increase or decrease the text of all the same tags in one page?