GitXplorerGitXplorer
t

scroller

public
2 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
45a396b2b33e8afbe5449c2439a2d038003c83e2

JSHint cleanup

ttivac committed 10 years ago
Unverified
116faa2aa078bd7f2361221c0c31c2608bbc695b

Better check to bail on further iteration

ttivac committed 10 years ago
Unverified
f38e2576d9d9f12d73437cadd0db9ef0f9bb79d2

Break apart calculations, scale anim to distance

ttivac committed 10 years ago
Unverified
c0147160489c8030cc625d8571699c26310c2a09

Simpler, more accurate scrollbar click logic

ttivac committed 10 years ago
Unverified
d7ce86bb7b25979ebb8f79446c19f7219163f9da

Rework scrollbar markup

ttivac committed 10 years ago
Unverified
6dd55f1b73e177b83aa69abe032a400fdf1c9a5d

Scroll by a consistent amount

ttivac committed 10 years ago

README

The README file for this repository.

scroller

Rationale

I need custom JS/HTML scrollbars for within the GW2 client because webkit doesn't support a lot of features using pseudo element styling. Useful things, like ::before/::after and transitions and filters.

Most existing solutions are jQuery based or very complicated. I don't want that.

This solution is using only the purest vanilla JS (plus CSS & some markup) with special attention paid to performance. By using requestAnimationFrame() to throttle scroll events (via https://github.com/tivac/raf-throttler) and translateY() for scrollbar handle position this should be blazing fast all the time.

No thought is given to supporting non-webkit browsers, though I'm not trying to exclude them either. I'm targeting Chromium 28 because that's what is embedded in GW2 currently.

Example

http://jsbin.com/likez/

Development

I'm building this inside jsBin as an experiment. I think I like it?

http://jsbin.com/yuyag/2/edit