In a desktop browser I wanted to close a list if anything was clicked:
$('html').click(function(e) {
// ======================================================================= //
// if anything other than nav cog is clicked, hide nav ul
// ======================================================================= //
if($('nav ul').is(':visible')){
//$('nav ul').css('display','none');
$('nav ul').fadeOut(200);
}
});
and it does the job.
But on an iphone nothing happends. I read that iphones detect touches, not clicks. Can you tell me how I can detect if anything was ‘touched’ on a mobile device? specifically iphone/ipad? Everything I try googling returns detecting mobile device, not touch.
Thanks