oop - Extend JavaScript Class from separate file -


i'm sorry ask quite dim question i'm new oop in javascript.

i'm trying use john resig's simple javascript inheritance method, , ideally i'd store within utils.js, , use (using class.extend), throughout range of script files project uses. possible? i've noticed if create subclass within utils.js file, can create new instance of class different script, makes me think might possible. have method being wrapped in immediately-invoked function expression?

sure it's possible, load util.js file before rest. although if (seems you're starting have several different files in project) i'd check out http://requirejs.org/ or other amd library break project in modules.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -