jQuery is just a Javascript library. jQuery doesn't have any objects in itself, you use the objects in Javascript. (jQuery does however have a few methods that can be useful for dealing with objects, like the extend method.)
You need a constructor function to use the new keyword. It's basically just a regular function:
function Person() {
}
Now you can create the object exactly as in your code.
You can also set the properties in the constructor:
function Person(name, age) {
this.name = name;
this.age = age;
}
Usage:
var person = new Person("John Doe", "16");
The constructor function has a prototype object that you can attach methods to:
Person.prototype.getFirstName = function() {
return this.name.split(' ')[0];
};
Now you can use those methods on any object that you create with that function:
var person = new Person("John Doe", "16");
var firstName = person.getFirstName();
If you just need one object, for example to pass on some data, you can create it using the literal object syntax:
var person = { name: "John Doe", age: "16" };
Update:
Yes, you can create an object any way you like and pass it on to a jQuery method:
$.get(url, new Person("John Doe", "16"));