0

I want to use Zepto in a page that has both jQuery and Prototype. But i can't find noConflict() in Zepto documentation. I use my jquery code with prototype on the same page so no-conflict is very important.

Can someone let me know how to use Zepto in noConflict mode?

4

1 に答える 1

4

It looks like here in the source if you include Zepto after jQuery or whatever library that will get $, it will not set it (defacto noConflict()):

// If `$` is not yet defined, point it to `Zepto`
window.Zepto = Zepto
'$' in window || (window.$ = Zepto)
于 2012-09-29T12:28:27.730 に答える