Prev Demo
jQuery
>
.Hover() - Attach Hover Event To Element
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <style> #pHover { background-color:mintcream; color:brown; padding:10px; } .class1{ background-color:mintcream; color:brown; padding:10px; } </style> </head> <body> <h1>This is the Normal Content</h1> <ul class="class1"> <li>Australia</li> <li>NewZeland</li> <li>England</li> <li>Germany</li> <li>Italy</li> </ul> <h1>This is the Hiding Content</h1> <ul id="pHover"> <li>India</li> <li>Srilanka</li> <li>Bangladesh</li> <li>Nepal</li> <li>Bhutan</li> </ul> <script> $("#pHover").hover(function () { $(this).hide(500); }); </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output