| Page 1 of 1 | [ 4 posts ] |
|
I have used following code to load multiple JS, it seems doesn't work at all. any suggestion how to load multiple JS on the single model.
YUI({ fullpath: 'myfile1.js myfile2.js ...' }).use('f1','f2', function(Y) { }); Thanks. Vincent |
Juan Ignacio DopazoYUI Contributor
|
Hey Vincent!
You need to declare each module in the "modules" property of the YUI configuration. Code: YUI({ modules: { 'f1': { fullpath: 'myfile1.js' }, 'f2': { fullpath: 'myfile2.js' } } }).use('f1', 'f2); There are multiple ways of structuring your project files. Check out the Loader documentation for more info! |
|
It is possible, has a single module to load multiple js. I have a lot of not YUI3 existing JS code.
YUI({ modules: { 'f1': { fullpath: 'myfile1.js, myfile2.js, myfile3.js...' }, 'f2': { fullpath: 'myfile4.js' } } }).use('f1', 'f2'); |
Juan Ignacio DopazoYUI Contributor
|
No exactly, but you can define dependencies for one module and have that one require all the others you need, so effectively you just use() one module and load all the others.
|
| Page 1 of 1 | [ 4 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group