Guest User

Untitled

a guest
Oct 20th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. for (var i = 0; i < data.features.length; i++)
  2. {
  3. var precio = parseFloat(data.features[i].properties.precio);
  4. if (precio != '')
  5. precio = '$' + precio.toFixed(0).replace(/(d)(?=(ddd)+(?!d))/g, "$1,");
  6. else
  7. precio = 'Sin precio';
  8.  
  9. h += '<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12 propDetails"' +
  10. 'style="background-image: url('ruta/images/'+ data.features[i].properties.id +'/foto_principal.jpg')">' +
  11. '<img class="fav" src="../images/favorito.png">' +
  12. '<div class="details">' +
  13. '<p class="dom"><span>'+ precio +'</span><br>'+ data.features[i].properties.calle +'</p>' +
  14. '</div>' +
  15. '</div>';
  16. }
  17.  
  18. .propDetails
  19. {
  20. background-image: url(../images/default.png);
  21. }
Add Comment
Please, Sign In to add comment