jQuery doesn't define OOP primitives, so you are on your own. But it is easy to do what you want with plain JavaScript:
MyClass = function(options){
// whatever were in your initialize() method
};
And you can create instances like you used to:
var mc = new MyClass({});
If you used to have more things in the prototype you can add them like you used to:
MyClass.prototype = {
// no need for initialize here anymore
/*
initialize: function(options) {
},
*/
// the rest of your methods
method1: function() { /*...*/ },
method2: function() { /*...*/ }
}
Alternatively you can add your methods dynamically:
$.extend(MyClass.prototype, {
method1: function() { /*...*/ },
method2: function() { /*...*/ }
});
And finally you can provide your very own class creator:
var CreateClass = function(){
return function(){ this.initialize.apply(this, arguments); };
};
// the rest is a copy from your example
MyClass = CreateClass();
MyClass.prototype = {
initialize: function(options) {
}
}
var mc = new MyClass({});