Created
October 19, 2017 00:42
-
-
Save humbertocastelo/f122123eaf902a031747164a10372fa9 to your computer and use it in GitHub Desktop.
hasTouchEvent jQuery TouchSwipe
This file contains 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
<script type="text/javascript"> | |
function hasTouchEvent() { | |
try { | |
document.createEvent("TouchEvent"); | |
return true; | |
} catch(e) { | |
return false; | |
} | |
} | |
if (hasTouchEvent()) { | |
jQuery.getScript(document.location.protocol + "//sunplace.com.br/wp-content/themes/Amora/sprites/js/jquery.touchswipe.js?ver=4.8.2", function(data, textStatus, jqxhr) {}); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment