Lightweight JavaScript alternatives
Three interesting jQuery look-alikes
Here's a quick comparison of jQuery alternatives. All the libraries listed below support jQuery like syntax, eg.:$('#my_button').on('click', function()
{
alert('Hey there!');
});
As you can see jCore is 3 times smaller than jBone and 9 times smaller than Zepto.JS.jCore
version 1.0, MIT license
Homepage
3.10 kB (1.16 kB gzipped)
jBone
version 1.21, MIT license
Homepage
9.38 kB (3.33 kB gzipped)
Zepto.JS
version 1.2, MIT license
Homepage
25.7 kB (9.29 kB gzipped)
Supported features
The libraries support most popular jQuery functions. Not all of them so jQuery plugins will most likely not work with these libraries. The libraries also come with additional plugins so you might want to check projects' homepages.
- $.post()
- $.get()
- each()
- on()
- off()
- css()
- html()
- data()
- val()
- addClass()
- removeClass()
- remove()
- show()
- hide()
- get()
- offset()
- hasClass()
- find()
- text()
- append()
- prepend()
- parents()
Comments