$("#mydiv").hover(function() {
$(".class").stop(true, true).fadeIn(100);
}, function() {
$(".class").stop(true, true).fadeOut(100);
});
Suppose I have a snippet like something above. I have a lot similar hover functions need to be bound. How can I write a custom function to achieve this?
Something like:
$("#mydiv").myHover(".class", 100);