Javascript examples for jQuery:Mouse Event
When the mouse pointer enters the <span> element, hide it.
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("span").mouseenter(function(){ $(this).hide();/*from www. j ava2 s . c om*/ }); }); </script> </head> <body> <span>If you mouse over me, I will disappear.</span><br> <span>If you mouse over me, I will disappear.</span> </body> </html>