Skip to content

check for jQuery by looking for $ might cause conflicts #325

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

Closed
timelyportfolio opened this issue Mar 11, 2016 · 1 comment
Closed

check for jQuery by looking for $ might cause conflicts #325

timelyportfolio opened this issue Mar 11, 2016 · 1 comment
Labels
bug something broken

Comments

@timelyportfolio
Copy link
Contributor

I discovered this as I explored #83. In lines and lines of events, there is a check to see if jQuery is present by looking for $. I learned that the Chrome command-line API also defines a $ which causes $ to not be undefined when running from the console and the subsequent $(plotObj) to fail. I am aware of some other libraries that hijack the $. Would if( typeof jQuery !== undefined) be a more robust test? Or should $(plotObj) be wrapped in a try?

If nothing else, filing (and closing) this issue might help someone else in the future who might be trying to debug this problem.

@etpinard
Copy link
Contributor

Interesting. if( typeof jQuery !== undefined) does sound more robust.

Filling this as a bug.

@etpinard etpinard added the bug something broken label Mar 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

2 participants