viernes, 9 de octubre de 2009

jQuery doesn´t use dot in the id

I was using jQuery to run animations and setting the html content over a div... for example:

HTML:


Some Content


JAVASCRIPT:

$('#myDiv').hide();
$('#myDiv').html('other content');

It was working ok.

I did a change in the div id, so instead of myDiv, I was using myDiv.ext:

HTML:


Some Content


JAVASCRIPT:

$('#myDiv.ext').hide();
$('#myDiv.ext').html('other content');

This didn't worked using jQuery, but it worked using bare javascript as follows:

document.getElementById('myDiv.ext').style.display = 'none';
document.getElementById('myDiv.ext').innerHTML = 'other content';

So, jQuery doesn't handle ids with dots "." we should try to avoid using dots in the id of an element if we want to use jQuery.

If you keep this in mind I'm sure you'll save some time debugging.

jueves, 1 de octubre de 2009

Heart_Hunter Was Here, servidor hackeado!

No se que les pase a los hackers que con esta es la segunda vez que me dejan un servidor web fuera de línea.

Esta vez el mensaje dice: Heart_Hunter Was Here

Y luego? Qué gana el dichoso Heart_Hunter?

Solo deja mis sitios fuera de línea por un tiempo en lo que se coloca un nuevo servidor...

No entiendo porqué andan los hackers tirando servidores... alguien sabe porqué lo hacen?