JavaScript jQuery Basics Working with jQuery Collections Adding/Removing Classes

Haardik Gupta
Haardik Gupta
Full Stack JavaScript Techdegree Student 5,275 Points

dont know

i don't understand where im going wrong

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

    <script
    src="jquery-3.2.1.min.js"></script>
    <script src="app.js"></script>
</body>
</html>
app.js
const $submit = $('.submit-btn');
$submit.attr( 'disabled', true ).addClass('.disabled');

1 Answer

Steven Parker
Steven Parker
182,269 Points

When naming a class in a class-specific operation, use only the class name.

The period prefix is only used to designate a class when used as a CSS-style selector.