1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
<html> <head> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <link href="css/mycss.css" rel="stylesheet" type="text/css"> <script> $(document).ready(function(){ $('.abc') .on("mouseenter", function () { $("#def").show(); }) .on("mouseleave", function () { $("#def").hide(); }); }); </script> </head> <body> <a class="abc" >Hover over me</a> <div id="def" style="display: none;">This is hidden till hover</div> </body> </html> |
