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 trialStefan Cutajar
7,747 PointsBenefit of using jquery instead of css
Hi, Is there any particular reason why you use jQuery to select elements instead of normal css?
2 Answers
Steven Parker
231,261 PointsNormally, these are used for different things. CSS is used to apply styling, and JavaScript/jQuery to add functionality.
Where there is overlap, such as animations, CSS often has the advantage of smoother rendering in the browser.
Boon Kiat Seah
66,664 PointsIts for the benefit of teach jQuery. Otherwise, this should be done in css where concerns are separated for good coding practice.
Stefan Cutajar
7,747 PointsStefan Cutajar
7,747 PointsThanks :D