I’m trying to use this: http://api.jquery.com/jQuery.get/ and I don’t understand why the examples look like this:
$.get("test.php");
I’ve never seen the syntax $.get ? Why wouldn’t I do something like
$jQuery = new JQuery();
$jQuery.get(...);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
$symbol (equivalent tojQuery) is not a constructor, it’s a function and an object. As such, there is no need to usenewon it.$('css selector').get()returns an array of dom elements that the selector matched.$.get()does an HTTP GET request