Hacker News new | ask | show | jobs
by salimane 4610 days ago
is there any small library ala "notjquery.js" that is a drop in replacement for jquery but that calls the browser native stuff directly ? serious question ?
4 comments

You probably want something like Zepto.js. I'd also look into Lo-dash, which is a better, more functional-friendly version of Underscore.js that provides a ton of useful helper functions.

Be warned: Zepto doesn't claim to support any version of IE, so if you need IE support you'll want to fall back to jquery (yepnope works. Conditional HTML won't in IE10+).

jQuery is a map between its own small grammar and "the browser's generic stuff". You're thinking of jQuery.
jQuery does exactly that, with polyfills for browsers without the native implementation. jQuery 2.x does away with many of the polyfills since older IE versions aren't supported.

If you want an even smaller jQuery, you can build your own[0] without the modules you don't need.

[0] https://github.com/jquery/jquery#how-to-build-your-own-jquer...

Smaller than jquery would be Zepto.js