سؤال

When using JQTouch on mobile, the onclick() isn't sensitive enough. When I touch a button the href navigation associated to that button will occur; however, often times the touch doesn't trigger the onclick function associated to the button. In order for the onclick to work properly, the button has to be pressed fairly hard. Any ideas on a fix for this? Thanks.

هل كانت مفيدة؟

المحلول

use 'tap' event

like jquery code

bind('tap' , somefunction );

I think if you starting to do jquery app you know about what events there fired .

onclick is lazy , it fired after pause and offten douplicated , sometimes few times .

so attach 'tap' event to your element .

نصائح أخرى

bind 'tap' handler to your elements

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top