salve ho questo
che funziona bene con il mouse ma passo al touch non funziona.codice:.addEvent('mousedown',function(e){e.preventDefault();})
In rete ho trovato questa soluzione ma non capisco come utilizzarla
Grazie per uno spuntocodice:$(document).ready(function () { var isTouchDevice = 'ontouchstart' in document.documentElement; $("#touchSensitive").mousedown(function(event) { if (isTouchDevice == false) { pushed(); } }); $("#touchSensitive").mouseup(function(event) { if (isTouchDevice == false) { released(); } }); $('#touchSensitive').on('touchstart', function(){ if (isTouchDevice) { pushed(); } }); $('#touchSensitive').on('touchend', function(){ if (isTouchDevice) { released(); } }); });

Rispondi quotando