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

There is no Zepto.noConflict method #1365

Open
Montana opened this issue Jun 27, 2021 · 0 comments
Open

There is no Zepto.noConflict method #1365

Montana opened this issue Jun 27, 2021 · 0 comments

Comments

@Montana
Copy link

Montana commented Jun 27, 2021

Hey all,

Zepto doesn't seem to want to define global with the following code:

var first = document.getElementById('first-global'),
second = document.getElementById('second-global');

first.innerHTML = $;
second.innerHTML = Zepto

Is there anyway to define Zepto global only if $ isn't available?

I understand $ is less reliable, seems to me something is being overwritten. To be sure what's behind $ I used the following pattern:

(function($){
   $('selector').doSomething();
}(library));

Obviously where library is the other global variable besides $ I want to reference is Zepto.

Thank you all.

-Montana Mendy

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

1 participant