tengo este script:
necesito saber donde cambiar los valores para poder elegir yo que tamaño inicial y final de texto quiero.
Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cambio de tamaño de texto</title> <script type="text/javascript"> var zxcBlankImg='http://www.vicsjavascripts.org.uk/StdImages/Blank.gif'; // a blank .gif as a background image or null if not required null; // Functional Code - NO NEED to Change var zxcOOPCnt=0; function zxcZoomText(zxcobj,zxcssz,zxcfsz,zxcspd){ if (typeof(zxcobj)=='string'){ zxcobj=document.getElementById(obj); } if (!zxcobj.oopct){ zxcspd=zxcspd||100; if (zxcBlankImg){ zxcobj.style.backgroundImage='url('+zxcBlankImg+')'; } zxcobj.oopct=new zxcOOPTxtZoom(zxcobj,zxcssz,zxcfsz,zxcspd); } clearTimeout(zxcobj.oopct.to); zxcobj.oopct.minmax[4]*=-1; zxcobj.oopct.cngtxt(); } function zxcOOPTxtZoom(zxcobj,zxcssz,zxcfsz,zxcspd){ this.obj=zxcobj; if (zxcobj.style.position){ if (zxcobj.style.position='absolute'){ this.abs=[zxcobj.offsetLeft,zxcobj.offsetWidth]; } } this.ref='zxcoopct'+zxcOOPCnt++; window[this.ref]=this; this.minmax=[zxcssz,Math.min(zxcssz,zxcfsz),Math.max(zxcssz,zxcfsz),zxcspd,(zxcssz<zxcfsz)?-1:1]; this.to=null; } zxcOOPTxtZoom.prototype.cngtxt=function(){ if ((this.minmax[4]>0&&this.minmax[0]<this.minmax[2])||(this.minmax[4]<0&&this.minmax[0]>this.minmax[1])){ this.obj.style.fontSize=(this.minmax[0]+=this.minmax[4])+'px'; if (this.abs){ this.obj.parentNode.style.width=(this.obj.offsetWidth+parseInt(this.obj.style.fontSize))+'px'; this.obj.parentNode.style.left=(parseInt(this.obj.style.fontSize)/2)+'px'; } this.to=this.setTimeOut('cngtxt();',this.minmax[3]); } } zxcOOPTxtZoom.prototype.setTimeOut=function(zxcf,zxcd){ this.to=setTimeout('window.'+this.ref+'.'+zxcf,zxcd); } </script> </head> <body> <div id="demo" onclick="zxcZoomText(this,14,20,10);"> <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p> <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p> </div> </body> </html>