JavaScript jQuery Basics Working with jQuery Collections Adding/Removing Classes

Hello, Need help with this question, keep receiving error message.

Keep receiving error message, any suggestions?

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

2 Answers

Remi Vledder
Remi Vledder
14,143 Points

What is the error you're receiving?

It seems to be working.

Could you try replacing the jQuery include with the following:

<script src=""></script>

you are close you don't need to call again, chaining just means add another jquery method

var $submit = $('.submit-btn');
$submit.attr('disabled', true).addClass("disabled");