How to detect use was tap on screen or not?

How to detect use was tap on screen or not?

http://chan15.info/question/mobile/tap.html

I wrote a script that if user drag the slider and not release, it will catch the slider's value and do something, if release the handle, the timer will be clear, and function stop, but in some iPhone's safari, sometimes mouseup event will failed, I think because of the machine's efficient is not quite good so the browser too lag for it, so I want to add check function when the interval is running, is there any API can detect the user still tap on the screen or not?