skip to Main Content

How to toggle element attribute by checkbox selection jquery?

I need to toggle attribute 'disable' in button by checkbox selection? Please help $(document).ready(function() { $("#checkbox").click(function() { $(".btn-submit").attr("checked"); }) }); <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <input type="checkbox" class="checkbox" id="checkbox"> <button class="btn-submit" disabled>Submit</button>

VIEW QUESTION
Back To Top
Search