Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Myron Miller
Front End Web Development Techdegree Graduate 17,364 PointsjQuery basics/Working with jQuery Collections/adding and removing classes/ quiz question one of 2
Select the submit button by its class and save it to a variable called $submit. Then use the appropriate jQuery method to disable the button by adding a disabled attribute to it.
const $submit = .attr('.submit-btn').disabled, true );
2 Answers
Isaias francisco dos santos
10,635 PointsI think your code should looks something like this:
const submit = $('.submit-btn').attr('disabled', true );
Isaias francisco dos santos
10,635 PointsI went to the quiz and solved the problem like this:
var $submit = $('.submit-btn'); $submit.attr('disabled', true );
The staments says to first "Select the submit button by its class and save it to a variable called $submit" and then add the attribute.
Have a nice day.
Myron Miller
Front End Web Development Techdegree Graduate 17,364 Pointsthanks
Myron Miller
Front End Web Development Techdegree Graduate 17,364 PointsMyron Miller
Front End Web Development Techdegree Graduate 17,364 PointsThat doesnt work