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
Boonsuen Oh
18,788 PointsMy jQuery Project
Hi, after start watching jQuery basics course. I built my small project. I welcome anyone to take a look on it and give me feedback (may be even why and how my codes will work?)
1 Answer
Chyno Deluxe
16,936 PointsHey Zayn,
First of all, great use of jQuery basics. Unlike many other students, you took a step into actually putting your knowledge to work by creating this snippet of code.
One way you can optimize your JS code is to remove the function entirely and change your click function to something like this.
$("#circle").click(function() {
$(this).next().html("I KNOW YOU HAVE CLICKED IT!");
});
I hope this helps.
Boonsuen Oh
18,788 PointsBoonsuen Oh
18,788 PointsThanks!
Boonsuen Oh
18,788 PointsBoonsuen Oh
18,788 PointsThis code works
But why this code does not?
Could you help me out?