JavaScript jQuery Basics Working with jQuery Collections Adding/Removing Classes

Select the submit button by its class and save it to a variable called $submit. Then use the appropriate jQuery method ?

what is the ans of this question?

<!DOCTYPE html>
<html lang="en">
    <link rel="stylesheet" href="style.css">
    <button type="submit" class="submit-btn" >Submit If You Can</button>

    <script src="app.js"></script>
var submit = $('.submit-btn').css("button", "disabled");
Kevin Lewis
Kevin Lewis
15,088 Points
const $submit = $('.submit-btn');
$submit.attr('disabled', true).addClass('disabled');

1 Answer