Hola les paso a mostrar mi script.
El único problema que tengo es el de no saber por que no funciona.
La cosa seria que al definir $( (#- id) (. - Clase) (@ - Nombre) div ) tendria que cambiarse el fondo va, el script habla mejor que yo xD
Código Javascript
:
Ver originalfunction $(id){
/* --- Toma el valor 0 de id --- */
var Identificador = id.charAt(0);
/* --- Selecciona id,clase,nombre--- */
switch(Identificador){
case '#': document.getElementById(id).style.background='#000'; break;
case '.': document.getElementsByClassName(id).style.background='#000'; break;
case '@': document.getElementsByName(id).style.background='#000'; break;
default : document.getElementsByTagName(id).style.background='#000';
}
}