Skip to content
This repository has been archived by the owner on Feb 12, 2019. It is now read-only.

Commit

Permalink
fix iOS6 issue #28
Browse files Browse the repository at this point in the history
  • Loading branch information
cubiq committed Aug 22, 2012
1 parent eaaeebb commit bf19322
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Add to Home Screen Floating Layer

The script places a floating balloon to your mobile website inviting the user to add your app to the home screen. This is compatible with iPhone/4/iPod-touch and iPad, iOS >= 3.1.1.

Version: 2.0.2 - [Official homepage](http://cubiq.org/add-to-home-screen) - [Video](http://vimeo.com/19090537)
Version: 2.0.3 - [Official homepage](http://cubiq.org/add-to-home-screen) - [Video](http://vimeo.com/19090537)

## Usage
Include the script and the stylesheet in your page HEAD. That's all. Look at the examples for advanced features. Documentation on [cubiq.org](http://cubiq.org/add-to-home-screen).
Expand Down
2 changes: 1 addition & 1 deletion examples/manual-startup/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<body>
<p>scroll</p>
<p><button onclick="addToHome.show()">Show the message</button></p>
<p><a href="#" onclick="addToHome.show(); return false">Show the message</a></p>
<p>scroll</p>
<p>scroll</p>
<p>scroll</p>
Expand Down
5 changes: 3 additions & 2 deletions src/add2home.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,15 @@ var addToHome = (function (w) {

function show () {
var duration,
iPadXShift = 160;
iPadXShift = 208;

// Set the initial position
if ( isIPad ) {
if ( OSVersion < 5 ) {
startY = w.scrollY;
startX = w.scrollX;
iPadXShift = 208;
} else if ( OSVersion < 6 ) {
iPadXShift = 160;
}

balloon.style.top = startY + options.bottomOffset + 'px';
Expand Down

0 comments on commit bf19322

Please sign in to comment.