Question

I've made a website with a clickable DIV:

jQuery("#add").on('click', function(e){
addlist();
});    

It works on desktops, but not on touchscreens. I hope there is someone who could tell me how to make it clickable on touchscreens too.

Était-ce utile?

La solution

Use the tap event provided by jquery mobile.

The jQuery Mobile tap event triggers after a quick, complete touch event that occurs on a single target object. It is the gesture equivalent of a standard click event that is triggered on the release state of the touch gesture.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top