I am trying to assign hover event to 2 elements at the same time. Are there better ways to do this?
//I want to assign hover to another element.
$element1=$('hi');
$element2=$('hi2');
//I need to assign element 1 and element 2 to the same hover function...
$element1.hover(function(e){
codes......
})
Thanks for any helps.
Try this,
Live Demo
Or
or If you want to do by the ids instead of hi