-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added bower to the readme. Unified the src and unminified versions of…
… the plugin.
- Loading branch information
1 parent
c3d614f
commit ce47fd4
Showing
3 changed files
with
16 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ A jQuery plugin that switches between multiple header designs as you scroll, so | |
|
||
**[Check out the demo](http://aerolab.github.io/midnight.js/)** (watch the logo as you scroll). | ||
|
||
|
||
## Quick start | ||
|
||
Create your fixed nav (or header) as you typically would. For an example, something like this (you can use whatever markup suits you) | ||
|
@@ -116,20 +117,34 @@ $('nav').midnight({ | |
}); | ||
``` | ||
|
||
|
||
## Installation | ||
|
||
Midnight is available on Bower and NPM as **midnight.js**: | ||
|
||
``` | ||
bower install midnight.js | ||
npm install midnight.js | ||
``` | ||
|
||
|
||
## CDN Hosting | ||
|
||
To lower hosting costs & have users load midnight.js faster, you can use the [jsDelivr CDN](http://www.jsdelivr.com/#!jquery.midnight) like so: | ||
```htm | ||
<script src="//cdn.jsdelivr.net/jquery.midnight/{version}/midnight.jquery.min.js"></script> | ||
``` | ||
|
||
|
||
### Advanced | ||
|
||
You can use jsDelivr's [version aliasing & concocting](https://github.com/jsdelivr/jsdelivr#version-aliasing) to serve the latest minor branch version along with dependancies. For example, to download the latest patch versions of midnight.js v1.0.z together along with jQuery v1.11.z: | ||
```htm | ||
<script src="//cdn.jsdelivr.net/g/[email protected],[email protected]"></script> | ||
``` | ||
|
||
|
||
## Known Issues | ||
|
||
On iOS <7 and older Android devices scrollTop isn't updated fluently, which creates a choppy effect. It can be fixed somewhat by wrapping the body in container and detecting touch events, but we're leaving that as an open issue. We'll probably disable the effect on older mobile devices due to bad performance. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.