Created
November 2, 2015 10:18
-
-
Save ndelangen/648b6e3b4fdca2407a74 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
var elements = { | |
html: document.documentElement | |
body: document.body | |
}; | |
$(elements.body).one('touchstart', function () { | |
$(elements.body).off('mouseenter.cursor-detection'); | |
}); | |
$(elements.body).one('mouseenter.cursor-detection', function () { | |
if (!navigator.userAgent.match(/Android/i)) { | |
$(elements.html).addClass('has-cursor'); | |
} | |
}); | |
}(jQuery)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment