Ver Mensaje Individual
  #48 (permalink)  
Antiguo 14/01/2010, 13:54
Mr_Raymon
 
Fecha de Ingreso: diciembre-2009
Ubicación: España
Mensajes: 119
Antigüedad: 14 años, 4 meses
Puntos: 2
Respuesta: Combinar Lightbox (jQuery) con datos en XML

Entonces ¿tendria que hacerlo asi?

Código Javascript:
Ver original
  1. xml = stringToDoc(data);
  2.  
  3. items = new Array(4);
  4.  
  5. items[0] = "web";
  6. items[1] = "multimedia";
  7. items[2] = "movil";
  8. items[3] = "erp";
  9.  
  10. items.each(function(){
  11.  
  12. $(xml).find($(this)).each(function(){ <- &#191;En (this) pongo cada vez uno diferente (web, multimedia, movil y erp)?
  13.  
  14. titulo = $(this).find('titulo').text();
  15. fecha = $(this).find('fecha').text();
  16. info = $(this).find('empresa').text();
  17.  
  18. not = '<p>'+fecha+'</p><p>'+titulo+'</p><p>'+finfo+'</p>';
  19.  
  20. $(".noticias").append(not)
  21.  
  22. }) // fin de each
  23.  
  24. }) // fin del each por categorias

Última edición por Mr_Raymon; 12/03/2010 a las 04:30