am using jquery mobile for make weather app , i have some error withe code , i make table for weather information hourly like this : result
i want repeat only the information data not all table only tbody
mean this
code using
var html = '';
for (var h=0; h<24; h++) {
var date = new Date(data.hourly.data[h].time * 1000);
html += '<table class="table"><thead><tr><th>الرياح</th><th>درجة الحرارة</th><th>س</th></tr></thead>';
html += '<tbody><tr class="success"><td>' + Math.round(data.hourly.data[h].windSpeed) + ' ' + 'km/h' + '</td><td>' + Math.round(data.hourly.data[h].temperature) + '&deg;C' + '</td><td>' + date.getHours() + ':00' + '</td></tr></tbody></table>';
}
html += '</div>';
$("#hourly").append(html).hide().fadeIn("slow");
Aucun commentaire:
Enregistrer un commentaire