我想在一个同时有jQuery和Prototype的页面中使用Zepto。但我在Zepto文档中找不到noConflict()。
有人能告诉我如何在noConflict模式下使用Zepto吗?
发布于 2012-09-29 20:28:28
如果你在jQuery后面加上Zepto或者任何会得到$的库,它看起来就像here in the source,它不会设置它(事实上的noConflict()):
// If `$` is not yet defined, point it to `Zepto`
window.Zepto = Zepto
'$' in window || (window.$ = Zepto)https://stackoverflow.com/questions/12652618
复制相似问题