JavaScript jQuery Basics Working with jQuery Collections Adding/Removing Classes

Rodrigo Novaes
Rodrigo Novaes
9,629 Points

Chain the appropriate jQuery method to add the class of disabled to the submit button...

I'm lost here...

<!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>
const $submit = $('.submit-btn');
$submit.attr('disabled', true);

1 Answer

Steven Parker
Steven Parker
182,341 Points

The term "chain" refers to the technique of calling a method on the result of another method.

A generic example might look like this:


The "method2" in this example can be said to be "chained".