How to make div invisible to still able to click? display hidden or hide() will make it disappear but I want user still able to click it, as i put it on top of another object
How to make div invisible to still able to click? display hidden or hide() will make it disappear but I want user still able to click it, as i put it on top of another object
Share Improve this question asked Dec 5, 2012 at 12:16 FatDogMarkFatDogMark 1,2052 gold badges16 silver badges26 bronze badges 1- Please share your HTML and CSS markup along with whatever javascript you've tried. – davidethell Commented Dec 5, 2012 at 12:17
3 Answers
Reset to default 7You could set its opacity
to 0
. The opacity can be animated using animate
:
$('#mydiv').animate({opacity: 0});
If the <div/>
does not contain any contents, you could:
#mydiv {
background-color: transparent;
height: 50px;
width: 50px;
}
See the CSS2.1 property background-color
Maybe you'd like to use opacity:0;
or visibility:hidden;
:
.element {
opacity:0;
}
or:
.element {
visibility:hidden;
}
Hope it works! Good luck!