I’m a beginner with javascript and I just can’t seem to figure something out.
I’m trying to show an overlay div using jquery. Here’s what I have
$("#loginbutton").click(function() {
alert('Ola');
$('#overlay').show();
return false;
});
The accompanying css for the overlay
#overlay {
z-index:1000;
position:fixed;
top:0;
bottom:0;
left:0;
width:100%;
height:100%;
background:#000;
opacity:0.45;
-moz-opacity:0.45;
filter:alpha(opacity=45);
visibility:hidden;
}
Pressing the login button will show the alert but not the div. Has anyone got a clue why this is not working?
Thanks
You could try:
instead of