Sprint is a high-performance, 5KB (gzipped) DOM library for modern browsers. Sprint notably shines on bandwidth and resource constrained devices such as phones and tablets.
Sprint has a familiar, jQuery-like chainable API:
Sprint is an alternative—not a replacement—for jQuery. jQuery offers more features, handles more edge cases and supports more browsers. Sprint is just a thin layer making the DOM friendlier without sacrificing on performance.
Sprint relies on newer APIs supported by modern browsers (read: IE10+) and optimizes a bunch of other things in order to provide you with fast DOM operations.
Here are a few performance tests of some popular methods (Chrome 42, OS X 10.10.3) :
Thanks to its reduced feature set, Sprint is also a lot faster to parse and execute (about 40 times faster than jQuery).
The methods supported by Sprint are, for the most part, identical to jQuery's. The few small differences with jQuery are explained below. If nothing is mentioned, you can assume jQuery's documentation applies.
- off - no support for selector
- on - no support for selector and data
- toggleClass - no support for .toggleClass([switch])
- trigger - no support for Event object and extraParameters