2011-08-22 16 views

Respuesta

1

Actualmente no admite eventos táctiles.

+0

ver mi respuesta a continuación ... – TheBlackBenzKid

+6

@TheBlackBenzKid - si su respuesta obtiene un voto favorable, entonces no será "debajo" y más. Y si alguien más agrega una respuesta, se volverá aún más confuso. Recuerde, esto no es un foro. Enmarca tu respuesta completa. Si tiene un comentario, debe ser independiente. Si no está de acuerdo con una respuesta, bueno, esa es la razón por la que hay una opción negativa. – ctacke

+0

Lo que dijo el hombre de arriba ...: D –

-2

Esto no es parcialmente cierto. Desarrollo en Windows Phone 7. Y he logrado un efecto táctil.

http://jsfiddle.net/blackdynamo/yxhzU/

Aquí, esto funciona en HTC HD7 - versión móvil y versión de escritorio seleccionados. Puede ver el código a continuación:

<!DOCTYPE html> 
<html> 
    <head> 
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"> 
    <title>jQuery Mobile Carousel Demo - jsFiddle demo by blackdynamo</title> 
    <script type='text/javascript' src='http://code.jquery.com/jquery-1.4.4.min.js' jquery.mobile, carousel></script> 
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.js"></script> 
    <link rel="stylesheet" type="text/css" href="/css/normalize.css"> 
    <link rel="stylesheet" type="text/css" href="/css/result-light.css"> 
    <script type='text/javascript' src="https://github.com/blackdynamo/jQuery-Mobile-Carousel/raw/master/jquery.ui.ipad.js"></script> 
    <script type='text/javascript' src="https://github.com/blackdynamo/jQuery-Mobile-Carousel/raw/master/jquery.mobile.carousel.js"></script> 
    <style type='text/css'></style> 
    <script type='text/javascript'> 
    //<![CDATA[ 
    $(window).load(function(){ 
     (function($) { 
     $("#carousel1").carousel(); 
     $("#carousel2").carousel({direction: "vertical"}); 
    })(jQuery); 
    }); 
    //]]> 
    </script> 
    </head> 
    <body> 
Horizontal 
<div style="height: 300px; width: 500px"> 
    <ul id="carousel1" style="display: none;"> 
    <li> 
     <div style="width: 100%; height: 100%; background-color:#381;">Page 1</div> 
     </li> 
    <li> 
     <div style="width: 100%; height: 100%; background-color:#837;">Page 2</div> 
     </li> 
    <li> 
     <div style="width: 100%; height: 100%; background-color:#999;">Page 3</div> 
     </li> 
    <li> 
     <div style="width: 100%; height: 100%; background-color:#738;">Page 4</div> 
     </li> 
    <li> 
     <div style="width: 100%; height: 100%; background-color:#142;">Page 5</div> 
     </li> 
    <li> 
     <div style="width: 100%; height: 100%; background-color:#927;">Page 6</div> 
     </li> 
    <li> 
     <div style="width: 100%; height: 100%; background-color:#987;">Page 7</div> 
     </li> 
    <li> 
     <div style="width: 100%; height: 100%; background-color:#187;">Page 8</div> 
     </li> 
    </ul> 
    </div> 
Vertical 
<div style="height: 300px; width: 500px"> 
    <ul id="carousel2" style="display: none;"> 
    <li> 
     <div style="width: 100%; height: 100%; background-color:#381;">Page 1</div> 
     </li> 
    <li> 
     <div style="width: 100%; height: 100%; background-color:#837;">Page 2</div> 
     </li> 
    <li> 
     <div style="width: 100%; height: 100%; background-color:#999;">Page 3</div> 
     </li> 
    <li> 
     <div style="width: 100%; height: 100%; background-color:#738;">Page 4</div> 
     </li> 
    <li> 
     <div style="width: 100%; height: 100%; background-color:#142;">Page 5</div> 
     </li> 
    <li> 
     <div style="width: 100%; height: 100%; background-color:#927;">Page 6</div> 
     </li> 
    <li> 
     <div style="width: 100%; height: 100%; background-color:#987;">Page 7</div> 
     </li> 
    <li> 
     <div style="width: 100%; height: 100%; background-color:#187;">Page 8</div> 
     </li> 
    </ul> 
    </div> 
</body> 
</html> 
+2

¿Qué significa esta respuesta? "Esto no es verdad" no es una respuesta, probablemente sea un comentario. El enlace simplemente va a una página con algo de HTML y JS. Y no mucho de eso. Si ese HTML es una respuesta que muestra que funcionan los eventos táctiles, publique ese * HTML * aquí como la respuesta. No nos envíe a una página vinculada que realmente no muestre nada al respecto trabajando en un teléfono. – ctacke

+0

Ignorar mi CSS incluye. – TheBlackBenzKid

+1

La pregunta es sobre el control WebBrowsers para touch EVENTS. Mimizarlos con eventos de mouse en javascript es diferente. –

5

Actualmente es compatible con eventos sin contacto. Todo lo que necesita hacer para demostrar que es algo tan sencillo como esto:

document.ontouchstart = function() { alert("TS"); } 
document.ontouchmove = function() { alert("TM"); } 
document.ontouchend = function() { alert("TE"); } 

Ninguno de ellos se disparará en IE9 móvil.