<!DOCTYPE html> <html> <head> <style> .grey{ background-color:grey; } </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> </head> <body> <input id="item_price" class="grey" value="100.00" disabled="disabled" /> <br> <br> <input type="button" id="Button" value="disable/enable" /> <script> $(document).ready(function(){ $("#Button").click(function() { $("#item_price").attr('disabled', !$("#item_price").attr('disabled')); $("#item_price").removeClass("grey"); }); }); </script> </body> </html>