Here's my html code:
<div id="1">
<div class="latest">
</div>
<div class="myclass">
</div>
</div>
Here's my jquery:
$.each(data, function(k, v) {
var len = data.length;
$('.myclass').each(function() {
if ($('.myclass').length == len) {
$('.myclass').remove();
$('.latest').prepend('<div class="myclass">' + v.TheDatas + '</div>');
}
});
});
My problem here is if the v.TheDatas has many values, for example the total value of the v.TheDatas is 5 then it Only gives the first value and print it 5 times. What i want is print the all data 5 times.