Jquery Двойное нажатие на диаграмме jqplot

Мне нужно зафиксировать событие двойного касания на диаграмме jqplot. Я прошел по ссылке ниже. http://appcropolis.com/implementing-doubletap-on-iphones-and-ipads/ В jquery.jqplot.js я вставил следующий код:

this.onTouchEnd = function(ev) {

   var now = new Date().getTime();
   var lastTouch = $(this).data('lastTouch') || now + 1 /** the first time this will make delta a negative number */;
   var delta = now - lastTouch;
   clearTimeout(action);
   if(delta<500 && delta>0){
           // the second touchend event happened within half a second. Here is where we invoke the double tap code
           alert("Doubletapped");
   }else{
           // A click/touch action could be invoked here but wee need to wait half a second before doing so.
           alert("notdoubletapped");
   }
   $(this).data('lastTouch', now); 

Но он не обнаруживает событие двойного нажатия. В случае с jqplot, к чему должно относиться «это»? Должен ли он ссылаться на ev.data.plot? $(this).data('lastTouch')


person user930514    schedule 29.10.2012    source источник
comment
Вы смотрели на связыватель событий jQuery .dblclick: api.jquery.com/dblclick   -  person Calavoow    schedule 29.10.2012
comment
@Calavoow: Но мне нужно зафиксировать двойной щелчок на iPad, а не двойной щелчок, который работает в браузере.   -  person user930514    schedule 29.10.2012
comment
Связанный вопрос: stackoverflow.com/questions/5507638/   -  person Calavoow    schedule 29.10.2012