Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (var i = 0; i < data.features.length; i++)
- {
- var precio = parseFloat(data.features[i].properties.precio);
- if (precio != '')
- precio = '$' + precio.toFixed(0).replace(/(d)(?=(ddd)+(?!d))/g, "$1,");
- else
- precio = 'Sin precio';
- h += '<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12 propDetails"' +
- 'style="background-image: url('ruta/images/'+ data.features[i].properties.id +'/foto_principal.jpg')">' +
- '<img class="fav" src="../images/favorito.png">' +
- '<div class="details">' +
- '<p class="dom"><span>'+ precio +'</span><br>'+ data.features[i].properties.calle +'</p>' +
- '</div>' +
- '</div>';
- }
- .propDetails
- {
- background-image: url(../images/default.png);
- }
Add Comment
Please, Sign In to add comment