Hi there
I´m trying to turn off the lights when someone enter into a <area> tag, and turn it on when it leaves the <area> tag.
What i have done It is working, but not properly. YOu can see it at:
I have done this:
I have put a div, which id="oculta" at the end of the document, that is going to be show when your mouse is over the <area id="uno" /> tag
- <area shape="poly" id="uno" coords="90,0,140,93,144,133,75,176,0,54,90,0" href="#" alt="Alava llanada alavesa" />
- .....
- <div id="oculta"></div>
- </body>
- </html>
Jquery code:
- $('#uno').mouseenter(function(e){
- $('#oculta').css('display','block')
- });
- $('#uno').mouseleave(function(e){
- $('#oculta').css('display','none')
- });
CSS code
- #oculto{
- display:none;
- position:absolute;
- background:#000;
- width:100%;
- height:100%;
- z-index:2;
- display:none;
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=45)";
- filter: alpha(opacity=45);
- -khtml-opacity: 0.45;
- -moz-opacity: 0.45;
- opacity: 0.45;
- }
I have tryed to change mouseenter to mouseover and mouseleave to mouseout, but the same problem appears
Thanks!!!!