Created
April 26, 2016 12:47
-
-
Save IgnacioGaldames/a419a74db68c633d8d80223ae9ed715f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//funcion para agrandar o achicar el tama�o de letra (25/09/2003) | |
var max_size = 150; | |
var min_size = 50; | |
function dzIncreaseFontSize(idElemento) { | |
if (document.all || document.getElementById) { | |
var elemento = document.all ? document.all[idElemento] : document.getElementById(idElemento); | |
if (elemento) { | |
// el valor est�; indicado en porcentaje: | |
if(tamagnoLetras[idElemento] >= max_size){ | |
alert("No es posible aumentar mas el texto.") | |
}else{ | |
tamagnoLetras[idElemento] += 10; | |
if (elemento.length) | |
for (i=0; i < elemento.length; i++) { | |
elemento[i].style.fontSize = (tamagnoLetras[idElemento]+'%'); | |
} | |
else | |
elemento.style.fontSize = (tamagnoLetras[idElemento]+'%'); | |
} | |
} | |
} | |
} | |
function dzDecreaseFontSize(idElemento) { | |
if (document.all || document.getElementById) { | |
var elemento = document.all ? document.all[idElemento] : document.getElementById(idElemento); | |
if (elemento) { | |
// el valor está indicado en porcentaje: | |
if(tamagnoLetras[idElemento] <= min_size){ | |
alert("No es posible disminuir mas el texto.") | |
}else{ | |
tamagnoLetras[idElemento] -= 10; | |
if (elemento.length) | |
for (i=0; i < elemento.length; i++) { | |
elemento[i].style.fontSize = (tamagnoLetras[idElemento]+'%'); | |
} | |
else | |
elemento.style.fontSize = (tamagnoLetras[idElemento]+'%'); | |
} | |
} | |
} | |
} | |
function dzResetFontSize(idElemento) { | |
var elemento = document.all[idElemento]; | |
elemento.body.style.fontSize = '100'; | |
document.body.style.fontSize = '100'; | |
} | |
/*Llamados a los JS*/ | |
var tamagnoLetras = new Array(); | |
tamagnoLetras['noticiasingle1'] = 100; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment