Developing a jQuery plugin that returns a given object, instead of jQuery object itself!
- by mehdi5275
Hi,
Consider the following base code:
(function($) {
$.fn.myPlugin = function(settings) {
return this.each(function() {
//whatever
});
};
});
The plugin returns a jQuery object. The question is how am I supposed to write a plugin that returns a custom object so that I can do something like this:
var api =…