Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

Commit

Permalink
Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mlynch committed Nov 26, 2014
1 parent 09f26e1 commit a3733fe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions README.md
Expand Up @@ -16,4 +16,14 @@ To use this, add a `<ion-header-bar>` and a `<ion-content>`. Add the `header-shr
</ion-content>
```

It's also useful to add an empty spacer element inside the content to make sure it doesn't go up under the bar:

```html
<ion-content>
<div style="height: 50px"></div>
</ion-content>
```

Also make sure to include the `ionic.ion.headerShrink` angular module in your app.

Note, this should also work with an `<ion-nav-bar>`.
1 change: 1 addition & 0 deletions demo/index.html
Expand Up @@ -38,6 +38,7 @@
<h1 class="title">Things</h1>
</ion-header-bar>
<ion-content header-shrink scroll-event-interval="5">
<div style="height: 50px;"></div>
<div class="list card">

<div class="item item-avatar">
Expand Down
2 changes: 1 addition & 1 deletion ionic.headerShrink.js
Expand Up @@ -28,7 +28,7 @@ angular.module('ionic.ion.headerShrink', [])

var fadeAmt;

var header = $document[0].body.querySelector('ion-header-bar');
var header = $document[0].body.querySelector('.bar-header');
var headerHeight = header.offsetHeight;

function onScroll(e) {
Expand Down

0 comments on commit a3733fe

Please sign in to comment.