My JS =>
var path = "projelerimiz/otel/balsamo/img/";
var ext = ".jpg";
var i = 1;
var img, item, figure;
for (i; i<=11;i++){
item = '<div class="item"></div>';
$(item).appendTo(".swiper");
figure = '<figure class="frame"></figure>';
$(figure).appendTo(".item");
img = $('<img>'); //Equivalent: $(document.createElement('img'))
img.attr('src', path + i + ext);
img.appendTo(".frame");
}
My HTML =>
<div class="swiper">
</div>
what I have seen when I run the JS code =>
what I want to see when I run the JS code =>
I need to simply loop HTML content with divs, img, etc but there are some nested loops.
Thank you.