Ver Mensaje Individual
  #16 (permalink)  
Antiguo 28/02/2013, 23:57
Avatar de Reedyseth
Reedyseth
 
Fecha de Ingreso: enero-2009
Ubicación: Chihuahua, México
Mensajes: 419
Antigüedad: 15 años, 3 meses
Puntos: 36
Respuesta: no funcionan los enlaces ni estilos jquery mobile

Ok pithon ya te tengo la solucion, el problema no era de php si no de jQuery mobile, mira lo que pasa es que lo que hace jQuery mobile es que cada link que haces en vez de haga su secuencia normal, osea llevarte al otro sitio, lo que en realidad de hace es que te carga por ajax el elemento que quieres visualizar sin cargar bien los elementos que usan el plugin para que trabajes con el, hay algunos metodos que probe para evitar que lo hiciera por ajax si no que hiciera completa la redireccion y el unico metodo que encontre que me funciono fue agregarle el atributo

Cita:
data-ajax="false"
en el mismo lugar donde creas tu boton, quedandote el link de esta manera:

Código HTML:
Ver original
  1. <a href="detalles.php" data-role='button' data-ajax="false" >ver detalles</a>

Con eso evitas que jQuery Mobile te lo cargue por ajax y te lleve en realidad al sitio, ya lo probe y esta funcionando, te paso unos links a mi sitio para que veas como funciona, y tambien aqui te pego el sitio que utilize para trabajar

http://behstant.com/downloads/forums/sliderMobil.html

lo que tiene sliderMobil.html
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
  2. "http://www.w3.org/TR/html4/strict.dtd">
  3.     <meta charset='utf-8'/>
  4.     <meta name="viewport" content="width=device-width"/>    
  5.     <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
  6.     <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
  7.     <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
  8. </head>
  9.  
  10. <div data-role='page'>
  11.     <div data-role='content'>
  12.       <a href="detalles.php" data-role='button' data-ajax="false" >ver detalles</a>
  13.     </div>
  14. </div>
  15. </body>
  16. </html>
Lo que tiene detalles.php
Código PHP:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
  2. "http://www.w3.org/TR/html4/strict.dtd">
  3. <html>
  4. <head>
  5.     <meta charset='utf-8'/>
  6.     <meta name="viewport" content="width=device-width"/>
  7.     <link rel="stylesheet" href="css/jquery.mobile.pagination.css"/>    
  8.     <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />    
  9.     <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
  10.     <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
  11.     <script src="js/jquery.mobile.pagination.js"></script>
  12. </head>
  13.  
  14. <body>
  15. <?php
  16. $page = array("1.jpg","2.jpg","3.jpg");
  17. //$page es un array que recupero de una base de datos con la informacion que debo mostrar
  18.     for($i=0;$i<count($page);$i++){
  19.         ?>
  20.         <div data-role='page' id='page<?php echo $i+1;?>'>
  21.             <div data-role='header'>
  22.                 <h1>page<?php echo $i+1;?></h1>
  23.             </div>
  24.             <div data-role='content'>  
  25.             <?php
  26.             echo '<img src="img/'.$page[$i].'" />';
  27.             ?>
  28.                 <ul data-role='pagination'>
  29.                    <li class='ui-pagination-next'><a href='detalles.php#page<?php echo $i+2;?>'>Siguiente</a></li>
  30.                 </ul>
  31.             </div>
  32.         </div>
  33.         <?php
  34.     }
  35. ?>
  36. </body>
  37. </html>

De aqui pudes bajar el codigo fuente: http://behstant.com/downloads/forums/files/code_001.rar
__________________
Reedyseth
Te ayudo? No olvides dar un +
blog:http://behstant.com/blog
En el blog:Tutoriales de Desarrollo Web PHP, Javascript, BD y más.