Wednesday, 28 August 2013

Detecting Touch in a Div Box ? Javascript

Detecting Touch in a Div Box ? Javascript

Say I have setup a basic div like this :
<div id='signatureBox'></div>
I then want to register whenever the box is clicked on / touched in any
area. I am trying without success :
//Register signature callback
var signature = document.getElementById("signatureBox");
signature.onclick() = function () {
alert('signature JavaScript triggered');
}
Can anyone help ?
Thanks !

No comments:

Post a Comment