Foros del Web » Programando para Internet » Jquery »

Dar estilo a un data-role.

Estas en el tema de Dar estilo a un data-role. en el foro de Jquery en Foros del Web. Hola, por favor quisiera dar estilo a unas filas en Jquery mobile. La lista que quiero poner es: @import url("http://static.forosdelweb.com/clientscript/vbulletin_css/geshi.css"); Código HTML: Ver original < ...
  #1 (permalink)  
Antiguo 18/04/2013, 08:12
Avatar de satjaen  
Fecha de Ingreso: septiembre-2012
Ubicación: Jaén (Andalucía)
Mensajes: 893
Antigüedad: 11 años, 8 meses
Puntos: 10
Dar estilo a un data-role.

Hola, por favor quisiera dar estilo a unas filas en Jquery mobile.
La lista que quiero poner es:
Código HTML:
Ver original
  1. <ul data-role="listview" data-inset="true">
  2.                   <li><a href="#">
  3.                     <h3>Página</h3>
  4.                     <p>Lorem ipsum</p>
  5.                   </a></li>
  6.                 </ul>

En esta lista pondría los item.Pero el archivo donde quiero ponerlo es un js y no se como hacerlo. Así es como lo tengo ahora mismo:


js.js
Código Javascript:
Ver original
  1. $.each(data, function(i,item){
  2. html_user += '<tr ondblclick="pulsar(this, ' + *String.fromCharCode(39) + item.recambio + String.fromCharCode(39) *+ ');" >';
  3. html_user += '<td style="'+item.style+'"><input name="demo" type="radio" value="' + item.recambio + '"/></td>';
  4.  html_user += '<td  style="'+item.style+'">'+item.recambio+'</td>';
  5.  html_user += '<td  style="'+item.style+'">'+item.denominacion+'</td>';
  6.  html_user += '<td  style="'+item.style+'">'+item.coste+'</td>';
  7.  html_user += '<td  style="'+item.style+'">'+item.pvp+'</td>';
  8.  html_user += '<td  style="'+item.style+'">'+item.beneficio_total+'</td>';
  9.  html_user += '<td  style="'+item.style+'">'+item.existencias+'</td>';
  10.  html_user += '<td  style="'+item.style+'">'+item.existencias004+'</td>';
  11.  html_user += '<td  style="'+item.style+'">'+item.ubicacion+'</td>';
  12. html_user += '</tr>';
  13.  
  14. });  
  15.  }

Gracias
  #2 (permalink)  
Antiguo 18/04/2013, 12:53
Avatar de satjaen  
Fecha de Ingreso: septiembre-2012
Ubicación: Jaén (Andalucía)
Mensajes: 893
Antigüedad: 11 años, 8 meses
Puntos: 10
Respuesta: Dar estilo a un data-role.

Perdonar, pero a lo mejor no me he explicado bien. Lo que pretendo hacer es una busqueda filtrando datos. Este es el ejemplo:
http://jquerymobile.com/demos/1.0a1/...ts-search.html

Gracias
  #3 (permalink)  
Antiguo 18/04/2013, 14:15
Avatar de satjaen  
Fecha de Ingreso: septiembre-2012
Ubicación: Jaén (Andalucía)
Mensajes: 893
Antigüedad: 11 años, 8 meses
Puntos: 10
Respuesta: Dar estilo a un data-role.

Lo estoy intentando pero no me sale. Me podeis ayudar por favor?

Código Javascript:
Ver original
  1. $.each(data, function(i,item){
  2.  
  3.  html_user += '<div data-role="content">';
  4.  html_user += '<ul data-role="listview">';
  5.  html_user += '<li>'+item.recambio+''+item.denominacion+'</li>';
  6.  html_user += '</ul>';    
  7.  html_user += '</div>';
  8.    
  9.         });                    
  10.     }
  #4 (permalink)  
Antiguo 19/04/2013, 01:16
Avatar de satjaen  
Fecha de Ingreso: septiembre-2012
Ubicación: Jaén (Andalucía)
Mensajes: 893
Antigüedad: 11 años, 8 meses
Puntos: 10
Respuesta: Dar estilo a un data-role.

Voy a hacer la consulta en jquery mobile. Gracias

Etiquetas: estilo
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 12:28.