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 trialBruno Dias
10,554 Pointstype: "POST" or method: "POST"?
In the video, Dave McFarland mentions method "POST" but he types type: "POST" instead.
Which one is correct?
2 Answers
Steven Parker
231,275 PointsThe JQuery documentation explains that "method" was added in JQuery version 1.9.0. Prior to that, it was called "type", and "type" is still an alias for "method".
It could just be a habit Dave developed from using JQuery starting before version 1.9.0.
Best practice for now on would be to use "method".
Tan Guven
3,379 PointsIs there any different library just for simplify ajax? Because jquery is quiet big for just ajax.
Bruno Dias
10,554 PointsBruno Dias
10,554 PointsHey Steven, thanks for clarifying.