Skip to content

Instantly share code, notes, and snippets.

@Spaxe
Created February 8, 2012 12:16
Show Gist options
  • Save Spaxe/1768815 to your computer and use it in GitHub Desktop.
Save Spaxe/1768815 to your computer and use it in GitHub Desktop.
Detecting Mobile devices with Javascript
function TouchScreenAdapt()
{
if (typeof TouchEvent != "undefined")
{
$('body').removeClass('mouse').addClass('touch');
}
}
@Spaxe
Copy link
Author

Spaxe commented Feb 8, 2012

Thanks Andrew!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment