javascript - HTML Image Map Area touch event not firing -


i making simple mobile webpage have image image map on it. want image change when user touches image, , change when user lifts finger. image broken 3 parts, , image switches on touch varies based on of 3 areas touched.

my problem cant touchstart event fire image map area, on ios or android. if use onmousedown works properly, ios dosnt seem fire event until user has lifted finger, dosnt work me. can ontouchstart work if listen on div or image, know event handlers etc correct.

does know how can image map fire touch events properly, or html element can accomplish same thing?

<html> <head><title>touch test</title></head> <body> <script type="text/javascript">  //the handler want fire function ontouchstart(e){     alert('touch me more'); }  </script>  <div style="height:250px">    <div id="log"></div>    <div id="logdetails"></div>    <!--if dont have image map on image, ontouchstart fires properly-->  <img src='img/nbslogo.png' ontouchstart="ontouchstart(event)"  usemap='#imagemap'/>  <!--the touch event fires on div well--> <!--<div id="box" style="height:225px;width:225px;background:red;position:absolute;" ontouchmove="touchmove(event)" ontouchstart="ontouchstart(event)"></div>  --> </div>    <map id='imagemap' name='imagemap'>  <!-- touch event never fires.  if make onmousedown, fires properly, after user has lifted finger--> <area id='colddark' title='colddark' shape='rect' ontouchstart='ontouchstart(event)' coords='0,0,361,272'> </map>  </body> </html> 

any appreciated

thank you

i have done , used onmouseover works great in ios/android , in normal browsers. give try.


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -