Loading multiple versions of jquery mobile
We have an issue where we're injecting code (not malicious, through a SaaS service) into a page and there is already a version of jquery mobile in that page with a page defined. Is it possible to load 2 versions of jquery mobile into the page? We've tried a number of things but all of them haven't worked. Here's what we've tried:
Right after jquery loads, set noconflict() to our own variable (ncjq).
Then, right before loading our version of jquery mobile, we:
- ncjq(document).bind("mobileinit", function() {
- ncjq.mobile.ns = "newns-";
- ncjq.mobile.autoInitializePage = false;
- }
We've tried variations from above (ncjq, $ to reference the original jquery, and jQuery with different results, some working and sometimes not). We're making sure our data-role is data-newns-role in these attempts.
We've tried changing the unminified version and replacing all of the $ with ncjq to reference our noconflict version.
We've tried various things to the minified version as well (just replacing the main jQuery with ncjq or $).
Has anyone ever done this or does anyone have suggestions on how to get it to completely work?
Thanks in advance