How to attach hover event to an element in Jquery ?

 Posted by Vivek.Ramapuram on 11/5/2014 | Category: jQuery Interview questions | Views: 2222 | Points: 40

Here in the script in coding we have to attach or we have to use hover()method to hover event to a html element in jquery.

<script type="text/javascript">
$("#pHover").hover(function () { $(this).hide(500); });

This function runs and shows the output as "when user mouse over “pHover”(pHover means div id name) element,it will hide."

Asked In: spotted while learning | Alert Moderator 

Comments or Responses

Login to post response