rstacruz/nprogress — pull request #3 by markbao (2013-08-21 01:18:54+00:00)
Title: Add IE7-9 support

NProgress currently uses `transform: translate3d()`, which is only supported on IE10 (along with most modern browsers).

This fix sniffs whether the browser supports `transform: translate3d()`, and falls back to `transform: translate()` (IE9 and other non-3D-supporting browsers) or `margin` (IE7-8) if not.

- Adds a new setting (`positionUsing`) which is populated the first time that `NProgress.set()` is called, which stores which positioning CSS rule to use.
- `positionUsing` is populated using `NProgress.getPositioningCSS()`, which determines which positioning CSS rule to use (`translate3d|translate|margin`).
- Changes `NProgress.set()` to call `barPositionCSS()`, which returns a hash of CSS to set on the bar, and the positioning rule depends on what `positionUsing` is set to.

Sniffing code based heavily on Zynga/scroller IE8-9 support code:
https://github.com/zynga/scroller/pull/4