jQuery .hover() Event

In this tutoral we are learn about jQuery hover Event. you can user hover event on css class and id. The hover() method specifies two functions to run when the mouse pointer hovers over the selected elements. This method triggers both the mouseenter and mouseleave events.

jQuery .hover() Event Syntax :

$(selector).hover(inFunction,outFunction)

nicesnippets.com giving you best way of implementation of jquery .hover() Event. we are giving you free source code with live example. we will give you demo,Source Code and Examples for implement Step By Step

Example Demo

nicesnippets.com For Snippets
nicesnippets.com For Tutorials
nicesnippets.com For Live Demo
nicesnippets.com For Live HTML Editor
nicesnippets.com For Live HTML Editor
nicesnippets.com For Online Counter

Js Code

$(document).ready(function(){
    $("tbody tr").hover(function(){
        $(this).addClass("live-hover");
    }, function(){
        $(this).removeClass("live-hover");
    });
});

Html Code

<table class="table">
	  <tbody>
		  	<tr>
		    	<td>nicesnippets.com For Snippets</td>
		  	</tr>
		  	<tr>
		    	<td>nicesnippets.com For Tutorials</td>
		  	</tr>
		  	<tr>
		    	<td>nicesnippets.com For Live Demo</td>
		  	</tr>
		  	<tr>
		    	<td>nicesnippets.com For Live HTML Editor</td>
		  	</tr>
		  	<tr>
		    	<td>nicesnippets.com For Live HTML Editor</td>
		  	</tr>
		  	<tr>
		    	<td>nicesnippets.com For Online Counter</td>
		  	</tr>
	</tbody>
</table>

Css Code

tbody tr.live-hover{
  background: green;
}
Add