Hi all,
A safe way to contain jQuery within YUI is via a synchronous loading module. This is the code that mainly Andrew Nicols developed (and I a little) before MDL-15727 came along for the MyMobile theme:
YUI.applyConfig({
groups: {
'jquery': {
async: false,
combine: true,
modules: {
'jquery': {
fullpath: M.cfg.wwwroot + '/theme/mymobile/javascript/jquery-1.7.1.min.js'
},
'jquery-mymobile-custom': {
fullpath: M.cfg.wwwroot + '/theme/mymobile/javascript/custom.js',
requires: ['jquery']
},
'jquery-mymobile': {
fullpath: M.cfg.wwwroot + '/theme/mymobile/javascript/jquery.mobile-1.1.0.js',
requires: ['jquery-mymobile-custom']
}
}
}
}
});
YUI().use('jquery-mymobile', function(Y) {});
So you can then have jQuery in its own little cage and do any other bits and bobs within the empty braces of the 'use' function.
Cheers,
Gareth