JavaScript jQuery Basics Working with jQuery Collections Adding/Removing Classes

what's going on my code..

why it is incorrect ?

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

1 Answer

Adam N
Adam N
62,463 Points

Looks like the challenge wants you to do the chaining on line 2. In real life I think your way would be fine.

Let me know if this helps here