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
Sebastian Hewelt
Front End Web Development Techdegree Student 1,254 Points.addClass() does not work in my project
Hey,
Alongside with treehouse i learn to code on a different website. I'm writing a little project and i don't know why can't the div be added a class so it's background change.
I made the jquery function and added .clicked class to CSS. Unfortunately does not work.
Take a look, please:
1 Answer
Simon Coates
28,695 Pointsi was getting a bug on
var mainLink = "https://en.wikipedia.org/w/api.php?action=query&format=json&generator=search&gsrnamespace=0&gsrlimit=10&prop=extracts|pageimages&pilimit=max&exintro&explaintext&exsentences=1&exlimit=max&callback=JSON_CALLBACK&gsrsearch=" + value;
it seemed to crash at value. hence didn't attach the event. When i assigned "" to value, the jquery worked.