Foros del Web » Programando para Internet » Jquery »

Wizard con jquery tools standalone

Estas en el tema de Wizard con jquery tools standalone en el foro de Jquery en Foros del Web. Hola amigos: Estoy haciendo un Wizard con jquery tools pero no se que pasa porque intento pasar a la siguiente pestaña y no puedo. Ya ...
  #1 (permalink)  
Antiguo 30/05/2011, 13:42
Avatar de kimmy  
Fecha de Ingreso: julio-2008
Mensajes: 841
Antigüedad: 15 años, 9 meses
Puntos: 15
Pregunta Wizard con jquery tools standalone

Hola amigos:

Estoy haciendo un Wizard con jquery tools pero no se que pasa porque intento pasar a la siguiente pestaña y no puedo. Ya he revisado el código de distintas maneras y no se que mas hacer. Este es mi código:

Código HTML:
Ver original
  1. <script src="js/jquery.tools.min.js"></script>
  2. <link rel="stylesheet" type="text/css" href="css/standalone.css">  
  3. <link rel="stylesheet" type="text/css" href="css/tabs.css">
  4.    
  5. /* tab pane styling */
  6. .panes div {
  7.     display:none;      
  8.     padding:15px 10px;
  9.     border:1px solid #999;
  10.     border-top:0;
  11.     height:400px;
  12.     font-size:14px;
  13.     background-color:#fff;
  14. }
  15.  
  16.    
  17.     div.panes div {
  18.         background:#fff url(images/h300.png) repeat-x 0 5px;
  19.         -background:#fff;
  20.         height:400px;
  21.     }
  22.    
  23.     div.panes label {
  24.         margin-bottom:15px;
  25.         display:block;
  26.     }
  27.    
  28.     label.error {
  29.         color:red;
  30.     }
  31.  
  32. /* tablas */
  33.  
  34. table {
  35.     border-collapse: collapse;
  36.     width: 100%;
  37.     font-size: 0.9em;
  38. }
  39.  
  40. th {
  41.     background: #3e83c9;
  42.     color: #fff;
  43.     font-weight: bold;
  44.     padding: 2px 11px;
  45.     border-right: 1px solid #fff;
  46.     line-height: 1.2;
  47. }
  48.  
  49. td {
  50.     padding: 2px 11px;
  51.     vertical-align: top;
  52.     text-align:justify;
  53. }
  54.  
  55. tr.alt td {
  56.     background: #ecf6fc;
  57. }
  58.  
  59. tr.over td, tr:hover td {
  60.     background: #bcd4ec;
  61. }
  62.     </style>
  63.  
  64.  
  65. </head>
  66.  
  67. <div id="wrapper">
  68.  
  69. <!--Content Centro -->
  70. <div id="content">
  71. <div id="promotions_productos">
  72. <div id="wizard">
  73.  
  74. <!-- tabs -->
  75.     <ul class="tabs">
  76.  
  77.         <li><a href="#" class="w2 current">Evento</a></li>
  78.         <li><a href="#" class="w2">Atracciones</a></li>
  79.         <li><a href="#" class="w2">Alimentos/Bebidas</a></li>
  80.         <li><a href="#" class="w2">Serv. Festejos</a></li>
  81.         <li><a href="#" class="w2">Entretenimiento</a></li>
  82.         <li><a href="#" class="w2">Decoración</a></li>
  83.        
  84.     </ul>
  85.  
  86. <!-- panes -->
  87. <div class="panes">
  88.  
  89.  <div>
  90.         <table width='614'>
  91.   <p></p>  <p></p>
  92.   <form action="" method="get">
  93.    <label><tr>
  94.    <td>Fecha del Evento:</td>
  95.    <td><input name="fecha_evento" type="text"></td>
  96.    <td>Tipo de Evento:</td>
  97.    <td><input name="tipo_evento" type="text"></td>
  98.    </tr></label>
  99.    <label><tr>
  100.    <td>Dirección del Evento:</td>
  101.    <td><input name="dir_evento" type="text"></td>
  102.    <td>Características del Lugar:</td>
  103.    <td><input name="carac_lugar" type="text"></td>
  104.    </tr></label>
  105.    <label><tr>
  106.    <td>Hora Inicio:</td>
  107.    <td><input name="hora_ini" type="text"></td>
  108.    <td>Ctdad Invitados Niños:</td>
  109.    <td><input name="ctdad_niños" type="text"></td>
  110.    </tr></label>
  111.    <label><tr>
  112.    <td>Ctdad Invitados Adultos:</td>
  113.    <td><input name="ctdad_adult" type="text"></td>
  114.    <td>Requiere Generadora Energia:</td>
  115.    <td>
  116.        <label>
  117.          <input type="radio" name="energia" value="si" id="energia_0">
  118.          si
  119.          <input type="radio" name="energia" value="no" id="energia_1">
  120.          no</label>
  121.      </td>
  122.      </tr></label>
  123.      <label><tr>
  124.      <td colspan="4"><input id="terms" type="checkbox">I accept <a href="#">these</a> terms</td>
  125.      </tr></label> 
  126.      <label><tr>       
  127.         <td colspan="4"><button class="next">Next »</button></td>
  128.       </tr></label>
  129. </form>
  130.    </table>
  131.   </div>
  132.  
  133.   <div>
  134.             <h2>1...</h2>
  135.  
  136.             <p>
  137.                 <button class="prev">« Prev</button>
  138.  
  139.                 <button class="next">Next »</button>
  140.             </p>
  141.         </div>
  142.  
  143.   <div>
  144.             <h2>2...</h2>
  145.  
  146.             <p>
  147.                 <button class="prev">« Prev</button>
  148.  
  149.             </p>
  150.  
  151.         </div>
  152.  
  153.    <div>
  154.             <h2>3...</h2>
  155.  
  156.             <p>
  157.                 <button class="prev">« Prev</button>
  158.  
  159.             </p>
  160.  
  161.         </div>
  162.  
  163.     <div>
  164.             <h2>4...</h2>
  165.  
  166.             <p>
  167.                 <button class="prev">« Prev</button>
  168.  
  169.             </p>
  170.  
  171.         </div>
  172.  
  173.     </div>
  174.  
  175. </div>
  176.  
  177. $(function() {
  178.     // get container for the wizard and initialize its exposing
  179.     var wizard = $("#wizard");
  180.  
  181.     // enable exposing on the wizard
  182.    
  183. // enable exposing on the wizard
  184.     wizard.click(function() {
  185.         $(this).load();
  186.     });
  187.    
  188.  
  189.     // enable tabs that are contained within the wizard
  190.     $("ul.tabs", wizard).tabs("div.panes > div", function(event, index) {
  191.  
  192.         /* now we are inside the onBeforeClick event */
  193.  
  194.         // ensure that the "terms" checkbox is checked.
  195.         var terms = $("#terms");
  196.         if (index > 0 && !terms.get(0).checked)  {
  197.             terms.parent().addClass("error");
  198.  
  199.             // when false is returned, the user cannot advance to the next tab
  200.             return false;
  201.         }
  202.  
  203.         // everything is ok. remove possible red highlight from the terms
  204.         terms.parent().removeClass("error");
  205.     });
  206.  
  207.    
  208.  
  209.     // get handle to the tabs API
  210.     var api = $("ul.tabs", wizard).data("tabs");
  211.  
  212.     // "next tab" button
  213.     $("button.next", wizard).click(function() {
  214.         api.next();
  215.     });
  216.  
  217.     // "previous tab" button
  218.     $("button.prev", wizard).click(function() {
  219.         api.prev();
  220.     });
  221.  
  222. });
  223. </div><!--Fin Promotion -->
  224. </div><!--Fin Content -->
  225. </div><!--Fin Wrapper -->
  226. </div>
  227. </body>
  228. </html>

Me imagino que es en esta parte de la función:

Código Javascript:
Ver original
  1. // get handle to the tabs API
  2.     var api = $("ul.tabs", wizard).data("tabs");
  3.  
  4.     // "next tab" button
  5.     $("button.next", wizard).click(function() {
  6.         api.next();
  7.     });
  8.  
  9.     // "previous tab" button
  10.     $("button.prev", wizard).click(function() {
  11.         api.prev();
  12.     });

pero no logro ver el porque. Por favor sugieranme que puede hacer.

Gracias ;)
__________________
Caminando con el corazón partío

Etiquetas: javascript, tools
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 10:20.