Javascript examples for jQuery Method and Property:css
Plot a line over html text with CSS text-decoration
<html> <head> <title>JQuery example</title> </head> //w ww.j a v a2s . c o m <body> <p> Hover over <u>this</u> word to highlight <i>this</i> word </p> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script> $('u').on('mouseenter', function(){ $('i').css('text-decoration', 'underline'); }); $('u').on('mouseleave', function(){ $('i').css('text-decoration', 'none'); }); </script> </body> </html>