I have some problem with append array to a html: I create an array with html, first element is "li", than "img" and last element is "/li"
it returns
<li></li>
<img src="...">
but i need:
<li>
<img src="...">
</li>
here is jsfeedle
here js:
var items = [];
items.push( "<li class='cd-item'>" );
items.push( "bar" );
items.push("</li>");
var itm = items.join('');
$(".cd-items").append(itm);
what do i wrong?
Thanks!
Sorry for my English.