jquery - zepto.js: Viewport and Lazyload plugins? -


i used work jquery , using

i'm using zepto.js instead of jquery , of course plugins both through following errors.

uncaught referenceerror: jquery not defined

if update both plugins })(jquery); })(zepto); following errors come …

uncaught typeerror: cannot read property ':' of undefined

any ideas on that? possible make plugins work zepto? isn't zepto same jquery without older browser compatibility , additional touch events?

thank in advance.

matt

the line causing error appears be:

.extend($.expr[':'], { 

jquery uses own css-style selector evaluator called sizzle. in addition letting use $('#id .cls1 .cls2, #otherid') , standard css pseudo-selectors, supports extension custom selectors built-in :visible selector or :above-the-fold selector provided plugin.

since modern mobile browser support native document.queryselectorall function css selection, library sizzle isn't needed, saving significant amount of javascript. (that's why love zepto.) side effect these custom selectors aren't supported , $.expr doesn't exist. line depends on these, including line in plugin fail.

the news these convenience selectors , may able cut them out of script. if don't want find elements above , below fold way, can cut them out of code. need address line library calls $this.is(":visible") other don't see jquery-specific.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c++ - Using OpenSSL in a multi-threaded application -

All overlapping substrings matching a java regex -