Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* Body Classes
*
*/
function be_body_classes( $classes ) {
$classes[] = 'no-touch';
return $classes;
}
add_filter( 'body_class', 'be_body_classes' );
jQuery(function($){
// Touch Device Detection
var isTouchDevice = 'ontouchstart' in document.documentElement;
if( isTouchDevice ) {
$('body').removeClass('no-touch');
}
});
@erwstout

This comment has been minimized.

Copy link

@erwstout erwstout commented Aug 8, 2016

So in this instance, are you then just killing any hover states via css to do the work around? Just curious how you would approach the hover issue on iOS... I suppose you could also always do something like $('#element').tap()....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.