{"action":"created","issue":{"url":"https://api.github.com/repos/dirkgroenen/jQuery-viewport-checker/issues/19","labels_url":"https://api.github.com/repos/dirkgroenen/jQuery-viewport-checker/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/dirkgroenen/jQuery-viewport-checker/issues/19/comments","events_url":"https://api.github.com/repos/dirkgroenen/jQuery-viewport-checker/issues/19/events","html_url":"https://github.com/dirkgroenen/jQuery-viewport-checker/issues/19","id":66685588,"number":19,"title":"css animation conflicted with webkit overflow scrolling touch & doesnt support windows mobile detection","user":{"login":"dreamrage","id":1240775,"avatar_url":"https://avatars.githubusercontent.com/u/1240775?v=3","gravatar_id":"","url":"https://api.github.com/users/dreamrage","html_url":"https://github.com/dreamrage","followers_url":"https://api.github.com/users/dreamrage/followers","following_url":"https://api.github.com/users/dreamrage/following{/other_user}","gists_url":"https://api.github.com/users/dreamrage/gists{/gist_id}","starred_url":"https://api.github.com/users/dreamrage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dreamrage/subscriptions","organizations_url":"https://api.github.com/users/dreamrage/orgs","repos_url":"https://api.github.com/users/dreamrage/repos","events_url":"https://api.github.com/users/dreamrage/events{/privacy}","received_events_url":"https://api.github.com/users/dreamrage/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-06T19:31:40Z","updated_at":"2015-05-14T22:43:55Z","closed_at":null,"body":"used this for 1 of my project, awesome features. at 1 point this actually conflicted with the iphone webkit overflow scrolling touch features. also the detection for windows phone seem wrong as the navigator.useragent return html instead of body. my jquery & javascript not very good, here's the porposed changes for viewportchecker.js *tested & working;\r\n\r\n```javascript\r\n(function ($) {\r\n    $.fn.viewportChecker = function (useroptions) {\r\n        // Define options and extend with user\r\n        var options = {\r\n            classToAdd: 'visible',\r\n            offset: 100,\r\n            callbackFunction: function (elem) { }\r\n        };\r\n        $.extend(options, useroptions);\r\n        // Cache the given element and height of the browser\r\n        var $elem = this,\r\n            windowHeight = $(window).height();\r\n        this.checkElements = function () {\r\n            // Set some vars to check with\r\n            var scrollElem = ((navigator.userAgent.toLowerCase().indexOf('webkit') != -1) ? 'body' : 'html' || (navigator.userAgent.toLowerCase().indexOf('windows phone') != -1) ? 'body' : 'html' ),\r\n                viewportTop = $(scrollElem).scrollTop(),\r\n                viewportBottom = (viewportTop + windowHeight);\r\n            $elem.each(function () {\r\n                var $obj = $(this);\r\n                // If class already exists; quit\r\n                //if ($obj.hasClass(options.classToAdd)) {\r\n                if ($obj.hasClass(\"visible\")) { \r\n                    return;\r\n                }\r\n                // define the top position of the element and include the offset which makes is appear earlier or later\r\n                var elemTop = Math.round($obj.offset().top) + options.offset,\r\n                    elemBottom = elemTop + ($obj.height());\r\n                // Add class if in viewport\r\n                if ((elemTop < viewportBottom) && (elemBottom > viewportTop)) {\r\n                    $obj.addClass(options.classToAdd);\r\n                    $obj.one(\"animationend webkitAnimationEnd oAnimationEnd MSAnimationEnd\", function () {\r\n                        $obj.removeClass(\"animated bounceInUp\");\r\n                    });\r\n                    // Do the callback function. Callback wil send the jQuery object as parameter\r\n                    options.callbackFunction($obj);\r\n                }\r\n            });\r\n        };\r\n        // Run checkelements on load and scroll\r\n        $(window).scroll(this.checkElements);\r\n        this.checkElements();\r\n        // On resize change the height var\r\n        $(window).resize(function (e) {\r\n            windowHeight = e.currentTarget.innerHeight;\r\n        });\r\n    };\r\n})(jQuery);\r\n```"},"comment":{"url":"https://api.github.com/repos/dirkgroenen/jQuery-viewport-checker/issues/comments/102190784","html_url":"https://github.com/dirkgroenen/jQuery-viewport-checker/issues/19#issuecomment-102190784","issue_url":"https://api.github.com/repos/dirkgroenen/jQuery-viewport-checker/issues/19","id":102190784,"user":{"login":"Matt37137","id":12452203,"avatar_url":"https://avatars.githubusercontent.com/u/12452203?v=3","gravatar_id":"","url":"https://api.github.com/users/Matt37137","html_url":"https://github.com/Matt37137","followers_url":"https://api.github.com/users/Matt37137/followers","following_url":"https://api.github.com/users/Matt37137/following{/other_user}","gists_url":"https://api.github.com/users/Matt37137/gists{/gist_id}","starred_url":"https://api.github.com/users/Matt37137/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Matt37137/subscriptions","organizations_url":"https://api.github.com/users/Matt37137/orgs","repos_url":"https://api.github.com/users/Matt37137/repos","events_url":"https://api.github.com/users/Matt37137/events{/privacy}","received_events_url":"https://api.github.com/users/Matt37137/received_events","type":"User","site_admin":false},"created_at":"2015-05-14T22:43:55Z","updated_at":"2015-05-14T22:43:55Z","body":"I have the same problem with windows phone (my main device - nokia lumia 920 wp8.1), but your code does not fix anything. I tested it on the tutorial website, and as on mine, it loads only to the secend paragraph, and then stops loading. Same thing on my site, on original script, and on this one."}}