Re:Airbnb Releases Infinity.js: A Javascript Library for Smo...
by dotborg on Friday August 17, 2012 @01:23AM
(#4395185)
why it's based on jQuery?
[ Parent
| on HN ]
Re:Airbnb Releases Infinity.js: A Javascript Library for Smo...
by shmageggy on Friday August 17, 2012 @01:59AM
(#4395264)
Because re-inventing the wheel is soooo 20th century.
Re:Airbnb Releases Infinity.js: A Javascript Library for Smo...
by dotborg2 on Friday August 17, 2012 @03:39AM
(#4395459)
what if I don't use jQuery in my project?
Re:Airbnb Releases Infinity.js: A Javascript Library for Smo...
by threepointone on Friday August 17, 2012 @04:48AM
(#4395566)
Just for you, I went through their source, and these are all the jquery specific calls -
.height() .width() .offset() .remove() .append() .prepend() .prependTo() .find() .parent() .on() .off() .scrollTop() .outerHeight() .length
It seems to me like all of these would be covered by zepto. Or qwery. Or you could make your own adapter with Prototype. Or Mootools. Or Ext. Or YUI. Heck, you could probably whip up your own little library based on sizzle, or even just querySelectorAll. Then just fork infinity to use your lib, and you're good to go.
I hope you're not confused any more!
[I'm not affiliated with airbnb, just thought I'd help you out]
Re:Airbnb Releases Infinity.js: A Javascript Library for Smo...
by dotborg2 on Friday August 17, 2012 @05:53AM
(#4395672)
ok, sounds like a lot of boilerplate code to write, because "Its only dependency is on jQuery."
Re:Airbnb Releases Infinity.js: A Javascript Library for Smo...
by threepointone on Friday August 17, 2012 @06:14AM
(#4395697)
<script src="zepto.js"></script>
<script> var jQuery = Zepto; </script>
<script src="infinity.js"></script>
There.