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 trialbrevans26
15,198 PointsWhy plain JavaScript makes more sense?
I was following along completely fine with plain JS. Suddenly, the JQuery approach to AJAX sounds more confusing to me.
Where is the .open('GET', 'whateverpage.html')
and .send()
portions of code in the JQuery approach?
1 Answer
Steven Parker
231,172 PointsThe beauty of jQuery for AJAX is that you don't have to do all those separate operations. The jQuery functions handle it all for you! It makes it way simpler.
Until recently, AJAX would always be a reason to load jQuery for me. Otherwise, I'd use it if it was already loaded for some other reason and write plain JavaScript if not.
I say recently because now there's "fetch". If you're not familiar with it, you might try the Working With the Fetch API after you finish your jQuery course.
brevans26
15,198 Pointsbrevans26
15,198 PointsI was starting to internalize the steps using plain JS and could write fluently without cheating and looking back to the videos. I think that being able to visualize the steps makes more sense to me. Well, I will work a bit to dominate the JQuery way to do things.
Thanks Steven!