On iphone, detect if ANYTHING is touched

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

I don’t know if they would work, but there are several “touch events”

Click should work much the same as touch.

This works ok in my iphone.

There must be something else going on.

Here’s a good article about touch events from Patrick.