bendc/sprint
소개
최신 브라우저를 위한 작고 매우 빠른 jQuery 스타일 라이브러리입니다.
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- -2
- in 15 days
- -4
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalSprint.js
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:
$("div").addClass("new").append("<p>Hi Sprint</p>");
Philosophy
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.
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) :
.add()

.attr()

.css()

.has()

.map()

.next()

.not()

.parents()

.position()

.slice()

.text()

Thanks to its reduced feature set, Sprint is also a lot faster to parse and execute (about 40 times faster than jQuery).
API
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.
- add
- addClass
- after
- append
- appendTo
- attr
- before
- children
- clone
- closest
- css
- detach
- each
- empty
- eq
- filter
- find
- first
- get
- has
- hasClass
- height
- html
- index
- insertAfter
- insertBefore
- is
- last
- map
- next
- nextAll
- nextUntil
- not
- off - no support for selector
- offset
- offsetParent
- on - no support for selector and data
- parent
- parents
- position
- prop
- prepend
- prependTo
- prev
- prevAll
- prevUntil
- ready
- remove
- removeAttr
- removeClass
- removeProp
- replaceAll
- replaceWith
- scrollLeft
- scrollTop
- siblings
- size
- slice
- text
- toggleClass - no support for .toggleClass([switch])
- trigger - no support for Event object and extraParameters
- unwrap
- val
- width
- wrap
- wrapAll
- wrapInner
관련 프로젝트 살펴보기
불러오는 중…