Retain mouse hover (mouse enter) effect after click
Dear All
I am styruggling with
http://webvikas.net.in/befaft/ba.php
Please Click onn any circle to proceed
You will find 3 small circles on left hand side
mouseenter effect on small circles and ouseleave effect is workig fine (makes that portion reg)
I want to retain mouseenter effect after mouse click
currently on click , the red area fade-outs when mouse is out of that area
pls pls pls help
My javascript
- $('.basesmall').mouseenter(function(){ // small cricel click start
$(this).find('img').stop().fadeTo('slow', 1);
});
$('.basesmall').mouseleave(function(){
$(this).find('img').stop().fadeTo('slow', 0);
}).click(function() {
//$('.basemall').css('opacity',1);
$(this).find('img').stop().fadeTo('slow', 1);
});
Objective is to keep the image to opacity 1 when mouse enters
and mainatin after clicking the layer even when moue is out of that area
I could not do this ...failed !!
I had tried following script for top menu (in black strip)in same website
- $('.menu').hover(function() {
- $(this).toggleClass('menuhover')
- }).click(function() {
- $('.menu').removeClass('menuclicked');
- $(this).addClass('menuclicked');
- });
which is working