I'm busting my head on this script because I don't understand why it isn't working because it's supposed to be very simple, I just want to show and hide a certain div or change it's properties.
Javascript:
function show(x){
var y = document.getElementByClassName(x);
y.style.display= 'block';
}
function hide(x){
var y = document.getElementByClassName(x);
y.style.display = 'none';
}
HTML:
<a href='http://dreamspark.e-uvt.ro/dreamspark/'target='_blank'onmouseover='show('divdreamspark')'onmouseleave='hide('divdreamspark')'>
CSS:
.divdreamspark {
display: none;
}
I don't see what I'm doing wrong.