append string in variable using jquery in each loop code example
Example: append string in variable using jquery in each loop
var gethtml ='';
$('.nav li').each(function(){
var img_link = $(this).attr('data-menu');
gethtml += '<img src="'+img_link+'">';
});
$('.main-img').html(gethtml);