GithubHelp home page GithubHelp logo

wagerfield / parallax Goto Github PK

View Code? Open in Web Editor NEW
16.4K 16.4K 2.1K 3.71 MB

Parallax Engine that reacts to the orientation of a smart device

Home Page: http://wagerfield.github.io/parallax/

License: Other

JavaScript 100.00%

parallax's Introduction

Parallax.js

CDNJS

Parallax Engine that reacts to the orientation of a smart device. Where no gyroscope or motion detection hardware is available, the position of the cursor is used instead.

Check out the demo to see it in action!

Table of Contents

1. Getting started

1.1 Installation

1.1 a) Using the CDN

  1. Add <script src="https://cdnjs.cloudflare.com/ajax/libs/parallax/3.1.0/parallax.min.js"></script> to your markup
  2. Done!

Many thanks to the fine folks over at cdnjs for hosting our library.

1.1 b) Beginners

  1. Head over to the releases Section
  2. Download compiled.zip from the latest release
  3. Extract the ZIP archive and locate the parallax.js and parallax.min.js files
    • Use parallax.js if you want to snoop around in the code
    • Use parallax.min.js for deployment, because it has a smaller file size
  4. Copy the file of your choice into your project directory
  5. So far, so good!

1.1 c) Professionals

npm i -s parallax-js

You will then find the source code in node_modules/parallax-js/src/parallax.js and the browserified, babelified, uglified, production-ready version in node_modules/parallax-js/dist/parallax.min.js

1.2 Preparations

Include the Script

If you use the compiled version, either downloaded from the releases page, or copied from the dist folder, include the script like any other Javascript library:
<script src="path/to/parallax.js"></script>

Of course, when you've installed via npm, and use browserify/babel, you can also simply do:
import Parallax from 'parallax-js' or
const Parallax = require('parallax-js')

Create your HTML elements

Each Parallax.js instance needs a container element, the scene. You're free to identify it by any means you want, but for now, let's use an ID:

<div id="scene">
</div>

Per default, all direct child elements of the scene will become moving objects, the layers. You can change this to a custom query selector, but again, we're going with the easiest approach for now:

<div id="scene">
  <div>My first Layer!</div>
  <div>My second Layer!</div>
</div>

While all other options and parameters are optional, with sane defaults, and can be set programatically, each layer needs a data-depth attribute. The movement applied to each layer will be multiplied by its depth attribute.

<div id="scene">
  <div data-depth="0.2">My first Layer!</div>
  <div data-depth="0.6">My second Layer!</div>
</div>

1.3 Run Parallax

As soon as your DOM is ready and loaded, you can create a new Parallax.js instance, providing your scene element as first parameter.

var scene = document.getElementById('scene');
var parallaxInstance = new Parallax(scene);

That's it, you're running Parallax.js now!

2. Configuration

2.1 Programmatic vs Declarative

Most configuration settings can be declared either as data-value attribute of the scene element, or property of the configuration object. The programmatic approach will take priority over the data-value attributes set in the HTML.
Some options can also be set at run-time via instance methods.

Declarative:

<div data-relative-input="true" id="scene">
  <div data-depth="0.2">My first Layer!</div>
  <div data-depth="0.6">My second Layer!</div>
</div>

Programmatic:

var scene = document.getElementById('scene');
var parallaxInstance = new Parallax(scene, {
  relativeInput: true
});

Using Methods at Runtime:

parallaxInstance.friction(0.2, 0.2);

2.2 Configuration Options

relativeInput

Property: relativeInput
Attribute: data-relative-input

Value: boolean
Default: false

Makes mouse input relative to the position of the scene element.
No effect when gyroscope is used.

clipRelativeInput

Property: clipRelativeInput
Attribute: data-clip-relative-input

Value: boolean
Default: false

Clips mouse input to the bounds of the scene. This means the movement stops as soon as the edge of the scene element is reached by the cursor.
No effect when gyroscope is used, or hoverOnly is active.

hoverOnly

Property: hoverOnly
Attribute: data-hover-only

Value: boolean
Default: false

Parallax will only be in effect while the cursor is over the scene element, otherwise all layers move back to their initial position. Works best in combination with relativeInput.
No effect when gyroscope is used.

inputElement

Property: inputElement
Attribute: data-input-element
Method: setInputElement(HTMLElement)

Value: null or HTMLElement / String
Default: null

Allows usage of a different element for cursor input.
The configuration property expects an HTMLElement, the data value attribute a query selector string.
Will only work in combination with relativeInput, setting hoverOnly might make sense too.
No effect when gyroscope is used.

calibrateX & calibrateY

Property: calibrateX & calibrateY
Attribute: data-calibrate-x & data-calibrate-y
Method: calibrate(x, y)

Value: boolean
Default: false for X, true for Y

Caches the initial X/Y axis value on initialization and calculates motion relative to this.
No effect when cursor is used.

invertX & invertY

Property: invertX & invertY
Attribute: data-invert-x & data-invert-y
Method: invert(x, y)

Value: boolean
Default: true

Inverts the movement of the layers relative to the input. Setting both of these values to false will cause the layers to move with the device motion or cursor.

limitX & limitY

Property: limitX & limitY
Attribute: data-limit-x & data-limit-y
Method: limit(x, y)

Value: false or integer
Default: false

Limits the movement of layers on the respective axis. Leaving this value at false gives complete freedom to the movement.

scalarX & scalarY

Property: scalarX & scalarY
Attribute: data-scalar-x & data-scalar-y
Method: scalar(x, y)

Value: float
Default: 10.0

Multiplies the input motion by this value, increasing or decreasing the movement speed and range.

frictionX & frictionY

Property: frictionX & frictionY
Attribute: data-friction-x & data-friction-y
Method: friction(x, y)

Value: float between 0 and 1
Default: 0.1

Amount of friction applied to the layers. At 1 the layers will instantly go to their new positions, everything below 1 adds some easing.
The default value of 0.1 adds some sensible easing. Try 0.15 or 0.075 for some difference.

originX & originY

Property: originX & originY
Attribute: data-origin-x & data-origin-y
Method: origin(x, y)

Value: float between 0 and 1
Default: 0.5

X and Y origin of the mouse input. The default of 0.5 refers to the center of the screen or element, 0 is the left (X axis) or top (Y axis) border, 1 the right or bottom.
No effect when gyroscope is used.

precision

Property: precision
Attribute: data-precision

Value: integer
Default: 1

Decimals the element positions will be rounded to. 1 is a sensible default which you should not need to change in the next few years, unless you have a very interesting and unique setup.

selector

Property: selector
Attribute: data-selector

Value: null or string
Default: null

String that will be fed to querySelectorAll on the scene element to select the layer elements. When null, will simply select all direct child elements.
Use .layer for legacy behaviour, selecting only child elements having the class name layer.

pointerEvents

Property: pointerEvents
Attribute: data-pointer-events

Value: boolean
Default: false

Set to true to enable interactions with the scene and layer elements. When set to the default of false, the CSS attribute pointer-events: none will be applied for performance reasons.
Setting this to true alone will not be enough to fully interact with all layers, since they will be overlapping. You have to either set position: absolute on all layer child elements, or keep pointerEvents at false and set pointer-events: all for the interactable elements only.

onReady

Property: onReady

Value: null or function
Default: null

Callback function that will be called as soon as the Parallax instance has finished its setup. This might currently take up to 1000ms (calibrationDelay * 2).

3. Methods

In addition to the configuration methods outlined in the section above, there are a few more publicly accessible methods:

enable()

Enables a disabled Parallax instance.

disable()

Disables a running Parallax instance.

destroy()

Completely destroys a Parallax instance, allowing it to be garbage collected.

version()

Returns the version number of the Parallax library.

4. Development

4.1 Running the Project

  1. Clone the Repository git clone [email protected]:wagerfield/parallax.git
  2. Open the working directory cd parallax
  3. Install dependencies npm install
  4. Run development server gulp watch
  5. Open http://localhost:9000/ in browser

4.2 Opening an Issue

If you need help relating the direct usage of this library in a project of yours, provide us with a working, running example of your work. This can be a GitHub repository, a ZIP file containing your work, a project on CodePen or JSFiddle, you name it.
Do not complain about something not working without giving us some way to help you. Thank you!

4.3 Known Issues

SVG-Bug in MS Edge

It seems MS Edge does not support the children or querySelectorAll methods for SVG elements.

Animation running really slow

Depending on your site, the GPU might have a bit too much to do. You can try adding the CSS definition will-change: transform to the layer elements to speed things up. Use sparingly!

Gyroscope not working on Android

Android will only allow access to the gyroscope o secure origins (that is, with https protocol).

Gyroscope not working on iOS

Because gyroscope data had been abused to track users, it's disabled on iDevices by default and needs to be enabled by the users. You can try asking for permission via DeviceOrientationEvent.requestPermission.

Do something like:

DeviceOrientationEvent
  .requestPermission()
  .then(() => {
    new Parallax(scene)
  })

Unable to manually set position of layers

Since this often lead to issues, this library forces the positioning of the layers to be absolute. If you need to override this, add !important to your CSS positioning.

5. FAQ

How can I use this Library with jQuery?

jQuery will not prevent you from using this library in any way. If you want to use jQuery for selecting your Parallax scene element, you can do so too.

var scene = $('#scene').get(0);
var parallaxInstance = new Parallax(scene);

How can I interact with my layers?

Check out the section on the configuration option pointerEvents above.

How do I get the demo files to work?

Either download compiled_with_examples.zip from the GitHub Releases section, or follow section 4.1

6. Information

6.1 License

This project is licensed under the terms of the MIT License. Enjoy!

6.2 Authors

Matthew Wagerfield: @wagerfield
René Roth: Website

parallax's People

Contributors

aligo avatar drojdjou avatar extend1994 avatar genzeb avatar gndzro avatar jorgecasar avatar kkirsche avatar milosr avatar oakninja avatar pr3tori4n avatar reneroth avatar thehink avatar wagerfield avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

parallax's Issues

rotation and magnetic north feature?

Hi there,

Great little plugin here,
I'm wondering if there's a way to get this working sort of like a compass to where the object would be able to spin around (it would be awesome if you could work with magnetic north) opposed to how it is now shifting left/right/up/down?

Might be a cool feature!

Changing properties on the fly with jQuery version of parallax

Hi!
I just wanted to point out that I had a problems with jQuery version of parallax (I downloaded it 2 days ago I think). The problem was to changing parallax attributes on the fly.
My target:

  • if iPad is landscape orientation: parallax only works on left-right tilt
  • if iPad is portrait orientation: parallax only works on forward-backward tilt
    The plan:
  • change attributes (i.a. "scalar") of parallax on the window orientation event / using jQuery parallax script

Result:

  • Parallax worked only in first orientation after load page. If I changed orientation it works for a second and stopped (freezed).

Solution:

  • I've changed jQuery version to JS version of parallax script. Now is working fine.

Summation:

  • You're doing great job, but the jQuery version is something wrong :)

using parallax

Hello,

I really want to use parallax, but it breaks my layout. It causes the elements to be too big ( as big as their container or the scene ) and makes them stack on top of each other.

Is there a way I can prevent this and still use parallax ?

[Feature] Inverted axis (i.e. lying down)

When I was testing out the demo at http://wagerfield.github.io/parallax/ I noticed that if I was looking up at my phone while lying down, i.e. device tilted in the inverse direction to normal, the script did not invert the axis calculations.

I would be happy to pull request this for you and do the hard yards @wagerfield. However, if it is already a feature, I haven't located the setting or code at a cursory glance. Let me know if it is easy for you to implement or if you want an assist.

Adding 3D tilt as layers scroll?

Hi again. Been wondering and trying with failures to introduce a tilt to the layers movement. So far left = 40degree tilt, center = 0, right = 40 again.
It is something that would open a whole new world of possibilities for me but unsure on how to introduce this into the already present code :(

*On researching just found this - http://www.romancortes.com/blog/css-3d-meninas/ . Dam that is effective and somewhat to what i was trying to do with tilts. Guess I will have a go at that.

http://www.w3schools.com/css/css3_3dtransforms.asp

Parallax.js with backgrounds

Hello, I'm interested in using parllax.js, but with the backgrounds of elements not the position of the elements.

Is there any way anyone can help me get it working with background positions instead?

I would greatly appreciate any and all help!

Firefox 21 (OSX) requestAnimationFrame is not defined

In Firefox 21 on OSX I get the following error:

ReferenceError: requestAnimationFrame is not defined @ jquery.parallax.js:219

After updating to Firefox to v22 everything works fine.
Problem is that a part of the other javascript breaks because of this.

Not working on IE 8

The script seems to break when trying to use Internet Explorer.
There are several errors with the parallax.js file and also the script in html.

Is there any workaround or alternative code, that could display something else instead of the broken website for IE?

One of the many errors..

Object doesn't support this property or method:
this.onMouseMove = this.onMouseMove.bind(this);

Typo in the readme

Hello,
Nice work, but i think there is a typo in the readme.
The ul element is missing the scene class, it should be <ul id="scene" class="scene"> right?

Regards,

Xavier

Controlling Layers based on mouse movement within container

Hi,
it is all in the title. For me, it does not work very well that the layers are controlled by the mouse movement within the viewport. I would like to have the option to base it on the mouse movement within the surrounding container of the parallax. Like having an option to set a "mouseport".

Is this something I can achieve? How would I do this?

Thanks for any help.

Cheers

"deviceorientation" works on Surface but needs change of "desktop" detection

I have been trying to get it work on Microsoft Surface and at least the deviceorientation event is there and works (tested on Surface RT Windows 8.1 Preview IE11, not sure if IE10 also supports this).
The main problem is in the deviceorientation eventhandler:

Parallax.prototype.desktop =    !navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|BB10|IEMobile)/);
...
if (!this.desktop && event.beta !== null && event.gamma !== null) {

If you remove "!this.desktop" is does work on Surface which is matched by the desktop detection but is both desktop AND table. I suggest simply detecting the event and event properties is safer than device/userAgent parsing.

I am still working out why the demo works kinda strange and sometimes does not start, maybe it is because of beta nature of IE11, a slightly similar event handling or something else. But generally the deviceorientation event works.

Great work by the way :)

document.body not defined

Loading parallax inside <head> fails because Parallax.prototype.transformSupport expects to have document.body available (while checking for 3D transforms support)

Doesnt work on Blackberry Z10

The demo provided, is not working with Blackberry Z10. The animations are working fine. But the parallax effect using gyroscope or mouse move, both are not working.

inverted movements on Android 4.1

Firstly, awesome plugin, have been looking for a parallax effect as smooth as this! Up until now I have always used Cameron Mcefee's https://github.com/cameronmcefee/plax plugin. Which lacked in smart device support...

But I found when using my Galaxy N8000 Android 4.1 OS the movements are inverted I.e. when tilted horizontally the motion detection fires a verticle movement and vise-versa with verticle tilting firing horizontal movements...

Any ideas?

Anchor on Layer

Is it possible to have anchors within the parallax layers?

iPhone 5 issue iOS6

When you save the demo as bookmark to the homescreen, gyro stops working.

rendering issue in safari when scrolling

Wonderful script! I'm trying to use this in my new portfoliosite. I made an horizontal design with a fixed header and footer div. When I scroll the page (in my case horizontally) unfortunately i get some render issues with the fixed divs (only in safari). The divs first scroll with the content, unlike what a fixed div should do. After one hovers with the mouse at the area where the header and footer should be it renders them back (in parts).

Deleting the parallaxlayers makes the problem go away so I'm positive it has something to do with this. Any ideas on how to solve this?

chrome 31 BUG

chrome 版本 31.0.1650.63 m

有些层会不显示掉,移上去才会出现。

Unable to set dimensions. Also results in wrong size scale beyond 100% width.

Hello, firstly i apoligise if the solutions obvious but i have spent a few good hours trying to get around the issue.

I installed Parallax today after trying out a few alternatives. It works beyond my expectations apart from one issue i am unable to sort.

I use @media screen and (max-width: 479px) calls to control scales of content upon resizing. However Parallax seems to only take some unknown setting from somewhere then refuses new settings unless page is reloaded, compared to @media dynamically scaling on re size.

A bit tired but hopeful someone could explain to me what is going on. Thank You.
parallaxscale issue

Doesn't work in Chrome.

Doesn't work in Chrome (Windows 8, desktop mode). Works perfectly on my iPhone 5 and Firefox (Windows 8, desktop mode). Absolutely gorgeous design. Wow. Nice work.

Can i give Parallax event only on particular DIV?

Hi,

Great Plugin.
Currently, Parallax event is fire on document/body mouse event.
I have integrated parallax into my banner section and want to take effect only if user mouse hover over the only banner area instead of document/body mouse event.

Is that possible? How?

Thanks

onDeviceOrientation won't get fired after restart of mobile safari.

In some situations, onDeviceOrientation won't get fired. Results in no parallax effect.

Set up
iPhone 4S 6.1.3
Safari

Reproduce steps:

  1. Open jquery.html in the examples folder. Or direct on http://wagerfield.github.io/parallax/examples/jquery.html
  2. Click home button to return to springboard
  3. Dubble Click on home button
  4. Hold Safari icon until wobble
  5. Tap Remove minus icon
  6. Re open Safari

Expected result:
Same as you left it before the quit. Thus, moving pentagons

Actual result:
The pentagons are stationary. Not even a reload of the page will start the effect again (!). To make it work again you need to go to a page that activates deviceorientation (i gues) try htmlcompass.com or the official parallax demo page (http://wagerfield.github.io/parallax/). The above steps only induces this 'lock mode'. I have received reports from clients who says they are experiencing this behavior without having done any of the above steps. Its just suddenly locks..

[enhancement] Add missing bower.json.

Hey, maintainer(s) of wagerfield/parallax!

We at VersionEye are working hard to keep up the quality of the bower's registry.

We just finished our initial analysis of the quality of the Bower.io registry:

7530 - registered packages, 224 of them doesnt exists anymore;

We analysed 7306 existing packages and 1070 of them don't have bower.json on the master branch ( that's where a Bower client pulls a data ).

Sadly, your library wagerfield/parallax is one of them.

Can you spare 15 minutes to help us to make Bower better?

Just add a new file bower.json and change attributes.

{
  "name": "wagerfield/parallax",
  "version": "1.0.0",
  "main": "path/to/main.css",
  "description": "please add it",
  "license": "Eclipse",
  "ignore": [
    ".jshintrc",
    "**/*.txt"
  ],
  "dependencies": {
    "<dependency_name>": "<semantic_version>",
    "<dependency_name>": "<Local_folder>",
    "<dependency_name>": "<package>"
  },
  "devDependencies": {
    "<test-framework-name>": "<version>"
  }
}

Read more about bower.json on the official spefication and nodejs semver library has great examples of proper versioning.

NB! Please validate your bower.json with jsonlint before commiting your updates.

Thank you!

Timo,
twitter: @versioneye
email: [email protected]
VersionEye - no more legacy software!

Origin point changing

Good day!
Is there any way to change origin point of movement? Like "xorigin" and "yorigin" options in jParallax plugin (http://stephband.info/jparallax/)?
Or the only way - to change Plugin.prototype.onMouseMove function?

Left top corner:

  Plugin.prototype.onMouseMove = function(event) {
    // Calculate Input
    this.ix = 1 + (event.pageX - this.hw) / this.hw;
    this.iy = 1 + (event.pageY - this.hh) / this.hh;
  };

Right bottom corner:

  Plugin.prototype.onMouseMove = function(event) {
    // Calculate Input
    this.ix = -1 + (event.pageX - this.hw) / this.hw;
    this.iy = -1 + (event.pageY - this.hh) / this.hh;
  };

Flickering CSS-Background Images in Chrome

With Chrome i have an issue with flickering/disappearing css-background images.

In the demo http://wagerfield.github.io/parallax/ i can't reproduce that

this is a part of my css:

.background{
width: 2400px;
height: 579px;
background: url('../assets/images/wide/wand.png') no-repeat;
background-size: 2400px 579px;
background-position: auto;
background-attachment: scroll;
position: absolute;
margin:20px 0 0 -100px;
top:0;
left:0;
z-index: 700;
-webkit-backface-visibility:hidden;
}

How can i solve this problem?

Best way to discriminate invalid browsers?

Hi all.

I am about to finish a project using the parallax engine , but I am having some trouble trying to identify which browsers I shoud ban. I have tried with Modernizr.csstransform and Modernizr.csstransform3d ,but my old Iphone 3 claims having both features while the background is obviously not scaling properly. As of now, I have tested chrome, firefox, iphone4, Ipad, Opera in their latest versions all working fine, but I also know from my customers some versions of explorer are giving them trouble too.

Would someone be so kind as to advise me some strategy for this ? Thanks in advance.

All the best,

-Javier

Unbind/Destroy/Change data-depth on the fly

Hi,

Is there any possible to change the data-depth on the fly?

Or at least unbind/destroy the constructor, and re-init to apply the new data-depths? I can't seem to find it inside the documentation, only enable/disable, which did not apply new values onto the parallax instance.

Problem with X axis on heigh pages.

Hi! I have a high page (about 6000px). And have placed parallax in section at the bottom of the page. In that case X axis shift to top and barely react on mouse movement. As I understand it bind to center of document. How I can fix this? Thanks in advance!

Firefox 25 (OSX) slow when moving down and right

Hello, with Firefox 25, running your own demo, there is a very noticeable difference of framerate (speed) while moving the mouse down or right (slow) compared to up and left (fast). I would say the framerate is almost triple in the "good" directions compared to the "bad" ones.

By stressing my Macbook Air graphics capabilities with a large browser window (attached to an external display) the effect is even more noticable. I barely get 2-3 FPS while moving the mouse down or right, while I get smooth fluid animation when moving up or left.

On the same machine, Chrome is always fast and smooth.

Can you disable the resizing on the layers?

I fixed my previous issue by removing the layer entirely and applying it as a fixed overlay.

My current concern is the automatic resizing of the layers within the window. This often leaves some layers being cut off in a box form style which unlike the awesome wave demo doesn't seem to happen. Any advice? Thanks

How to make a layer to be a link?

Hi
I just want to say thet yuor plugin is amazing and works perfectly

I have just a question

How to make a layer to be a link to other site?
And how to ad a working link to the layers? If I put link over there it does not work

Firefox on mac very slow / jittery

How come on my MacbookPro Retina and on the iMac of my collegue in Firefox the rendering is very jittery? It actually slows down everything. On Chrome / Safari and also Firefox on my PC there is no problem with the script.

Any ideas?

Gyroscope and Orientation

Hi,

I would like to have a parallax effect on my mobile website
when i scroll and when i change orientation.
Is it possible to have both at the same time ?

Thank you for your help.

Emal

demo page is unaccessible

Error 503 Backend is unhealthy

Backend is unhealthy

Guru Meditation:

XID: 1380506743

Varnish cache server

Problems with iOS 6 devices

Hello! I'm experiencing problems with parallax.js on iOS 6 devices – it doesn't work at all. However, on iPhone 5c it works both in Safari and Chrome, but on iPhone 5 with iOS 7 it works very unstable in Chrome (after 10 page refreshes for example) and it works correctly in Safari. Same situation with iPad: on iOS 7 everything works smoothly.
HTML looks like this (http://jsbin.com/aJOjiMoz/1/) and the problematic page here: http://sulliwan.com

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.