You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(function($) {
/**
* Namespace: the namespace the plugin is located under
* pluginName: the name of the plugin
*/
var extensionMethods = {
/*
* retrieve the id of the element
* this is some context within the existing plugin
*/
showId: function(){
return this.element[0].id;
}
};
$.extend(true, $[ Namespace ][ pluginName ].prototype, extensionMethods);
})(jQuery);
To make it work I would need to provide the 'namespace' and 'pluginName'. Looks to me that these concepts are used ambiguously in literature. Tried several combinations to get the extension pattern to work, without success.
Any thoughts on this?
kbg
The text was updated successfully, but these errors were encountered:
Hi dabeng,
I'd like to add new factory functions without doing a fork. (Will be more than happy to share them with the community).
Found this approach:
http://stackoverflow.com/questions/2050985/best-way-to-extend-a-jquery-plugin/4414356#4414356
To make it work I would need to provide the 'namespace' and 'pluginName'. Looks to me that these concepts are used ambiguously in literature. Tried several combinations to get the extension pattern to work, without success.
Any thoughts on this?
kbg
The text was updated successfully, but these errors were encountered: