I'm working on a site where a list of items are 100% opacity and once an item is hovered, all other items reduce to 30% opacity. I this working correctly using the code below. Now what I need is for the item that is clicked on to remain at 100% opacity and removing the fade from the other items. Can anyone help? Thanks
$(function() {
$("#input_1_8>li").hover(
function() {},
function() {
$('#input_1_8>li').fadeTo(0.1, 1.0);
});
$("#input_1_8>li").hoverIntent(
function(){
$(this).attr('class', 'current'); // Add class .current
$(this).siblings().fadeTo(0.1, 0.3); // Fade other items to 30%
$(this).fadeTo(0.1, 1.0); // Fade current to 100%
},
function(){
$(this).removeClass("current"); // Remove class .current
$(this).fadeTo(0.1, 1.0); // This should set the other's opacity back to 100% on mouseout
}
);
$("#input_1_8>li").on('click', function(){
$("#input_1_8>li").unbind("mouseenter").
unbind("mouseleave");
});
});