Similar to jQuery but without the burden of history
Warning: This is historical. It worked and still works but I don't use it anymore and it didn't catch so I won't support it if there's a problem.
jQuery's "Write Less, Do More" is wonderful.
But it's old.
Now browsers are expected to have promises, CSS transitions, fetch, querySelectorAll, weak maps, array functions, arrow functions, etc.
Cross browser behavior is also very consistent.
And practices change.
Half of jQuery's API is now useless and half of the implementation of useful functions is useless.
But jQuery's logic is still relevant. And we don't need to learn it.
That's why jQuery simplified alternatives make a lot of sense. This is one. This is mine. It may not suit you.
- it's lighter
- it's faster
- it does all the things like jQuery
- it's educational. You can read and understand the code because it doesn't need to be as smart as jQuery fighting against obsolete browsers. And it certainly doesn't try to be clever.
- the js file size difference doesn't matter much compared to the rest of your site (and it's cached)
- client-side code speed isn't usually a problem
- I lied: Jacquerie doesn't do all the things done by jQuery. By design. It's very possible you need one function I deemed useless
- why lose time testing a new library and taking risks? Just use jQuery.
- you don't decide what browsers you want to support. Sigh.
- All Ajax and Defferred related functions make little sense in recent browsers. They're not in Jacquerie.
- There's no stack in Jacquerie traversing. jQuery's stack is heavy and very rarely used.
- As I consider the remaining most reasonable use of
datais to safely attach data to elements, data-attributes aren't read. - There's only a limited support for
:visible. You can only use it when it's the whole selector offilter(as is recommended for jQuery). :gt,:lt: use$.fn.sliceinstead (as is recommended for jQuery)- jQuery is lax on attribute selectors and lets you omit the quotes in
[name="value"]. Jacquerie letsquerySelectorAlldo the query and don't lose time cleaning your selectors. - I made choices, and things I found useless weren't implemented
- I probably forgot some important features. This can change, if you ask for them.
