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
Susan Jensen
15,190 PointsAjax basics Quiz Question - remove the class "selected"
I am stuck, stuck stuck on this question in the quiz:
Complete the code below to remove the class "selected" from all button elements.
$("button")._______("selected");
remove
does not work to fill in the blank.
I think, according to W3 schools Filter the Elements to be Removed, example 2 http://www.w3schools.com/jquery/jquery_dom_remove.asp
it would be
$("button").remove(".selected");
but I can'tput the dot in front of selected .selected, as it is already typed in without it in the quiz.
I have been trying for about half an hour, and in a few more minutes, my laptop is going out the window. Which would take considerable force, as i am working in a solid cinder block basement.
2 Answers
LaVaughn Haynes
12,397 Points"remove" removes elements from the DOM. You want "removeClass" https://api.jquery.com/removeclass/
Susan Jensen
15,190 PointsThank you.
And my laptop thanks you even more.
Donald Richmond
13,807 PointsDonald Richmond
13,807 PointsSusan, cannot answer that question. I do not even know why it was referred to me. I have yet to even START the course on AJAX. Hope you find an answer. I know how frustrating some questions can be when the answer eludes you.