I have a prototyped function that i would like to use it in a limited scope in order to provide it with a jquery plugin.
//Prototype
function StringBuilder(str) {
this.value = str;
}
StringBuilder.prototype.append = function (str) {
this.value = this.value + str;
return this;
};
//jQuery plugin with Revealing module pattern
jQuery.Rut = (function () {
//i would like to be able to use StringBuilder only in this scope
helloWorld = new StringBuilder('Hello');
helloWorld.append(' World');
})(window);
Is that possible?
Thanks
Aucun commentaire:
Enregistrer un commentaire