function - How to create both onClick and mouseover to a link jQuery -
i have script change main image on click link .feature_thumb class. want make it's both click , hover.
$(".feature_thumb").click(function(){ var main_href = $(this).attr('href'); change_image(main_href ); }); can me this?
i tried didn't work...
$(".feature_thumb").on('click hover') function(){ var main_href = $(this).attr('href'); change_image(main_href ); }); thank you
hover() jquery method shorthand $( selector ).mouseenter( handlerin ).mouseleave( handlerout ); in fact want mouseover:
$(".feature_thumb").on('click mouseover', function(){...}); or depending exact expected behaviour , html markup, use mouseenter.
Comments
Post a Comment