I have this css:
.disable {
properties
}
.comment_action:hover {
properties
}
I have this jQuery:
//comment button index disable
$("#mydiv").toggle(function() {
$(this).find(".comment_action").addClass('disable');
},
function(){
$(this).find(".comment_action").removeClass('disable');
});
The problem for me is that when I doing click the .comment_action:hover is not disappear or removed. I want that If I doing click on the class .comment_action:hover dissapear and if I doing click again the .comment_action:hover appear.
You would need an
!importantadded to properties you want to override in the:hoverpsuedo-selector…Because
:hovertakes precedence, even if.disabledis applied.Also your javascript should be calling find with
.comment_actioninstead ofcomment_actionSee working example: http://jsfiddle.net/TN4rh/11/