How to mix hover and click in same function?Here I have a hover function,but I want to add click function beside hover function.
$(document).ready(function(){
$('.img').hover(function (e) {
e.preventDefault();
$(". img").css({"opacity":"0.4","filter:":"alpha(opacity=40)"});
$(this).css({"opacity":"100","filter:":"alpha(opacity=100)"});
alert('test');
});
});