FunctionSource, Your Source for Developer News

jQTouch, with some Zepto spice

Posted by Dion Almaer 2 years ago on jqtouch jquery zepto

Jonathan Stark keeps the jQTouch torch going, and A. Jesse Davis has just put up a pull request to add Zepto compatibility:

jQTouch is now compatible with Zepto, a very lightweight partial replacement for jQuery on WebKit browsers.

A few low-risk changes to jQTouch lets those who target only WebKit to replace jQuery’s 26k of minified, gzipped Javascript with Zepto’s 2.5k. Those who target both WebKit and non-WebKit browsers can conditionally load jQuery or Zepto.

Is it a lot of work to make sure you are Zepto compatible?

I will let you be the judge.

As some folks target specific devices with smaller payloads, some shout “we don’t want best in IE again!” and others scream “we don’t want wasted bits!”. If you are compatible, then some detection could be put in place to only send down the right file for the given case.

It doesn’t have to be either-or.