Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defensively copy jQuery #49

Open
withjam opened this issue Sep 20, 2016 · 1 comment
Open

Defensively copy jQuery #49

withjam opened this issue Sep 20, 2016 · 1 comment

Comments

@withjam
Copy link
Owner

withjam commented Sep 20, 2016

Had a strange issue that made lodlive stop working. Another script overwrote the global jquery variable so that none of the plugins were available to lodlive anymore. Angular.element().lodlive worked the whole time - most likely because angular keeps its own pointer to jquery. Lodlive may need to do the same to prevent this type of thing from happening with other external scripts.

@ianwdunlop
Copy link

ianwdunlop commented Sep 21, 2016

I have had the exact same issue. Got round it by exporting LodLive as a js module
exports.LodLive = LodLive;
and then instead of using the jquery function I created it using the same logic it uses:
var ele = $('#lodlive');
var options = { profile: MyProfile, firstUri: 'http://a.b.c' };
var ll= new LodLive(el, options.profile);
ele.data('lodlive-instance', ll);
ll.init(options.firstUri);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants