How to underline a Hyperlink on Hover using jQuery?

To underline a hyperlink on hover using jQuery, use the jQuery css() property. The color text-decoration  property is used.


You can try to run the following code to learn how to underline a hyperlink on hover:

Live Demo


      <title>jQuery Hyperlink Decoration</title>
      <script src = ""></script>
         $(document).ready(function() {

               function () {
      a {
           text-decoration: none;
      <a href="#">Demo text</a>