Skip to content

Commit

Permalink
fixes #2 Microsoft IE and Edge support
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparsj committed Oct 15, 2016
1 parent 1ef26ee commit 172c658
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery-data-parallax",
"version": "0.1.20",
"version": "0.1.21",
"homepage": "https://github.com/kasparsj/jquery-data-parallax",
"authors": [
"Kaspars <[email protected]>"
Expand Down
5 changes: 3 additions & 2 deletions jquery.data-parallax.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
};

function testTouchEvents() {
return 'ontouchstart' in window // works on most browsers
|| 'onmsgesturechange' in window; // works on ie10
return ('ontouchstart' in window) ||
(navigator.maxTouchPoints > 0) ||
(navigator.msMaxTouchPoints > 0);
}

$.fn.parallax = function(method) {
Expand Down
Loading

0 comments on commit 172c658

Please sign in to comment.