this is my function :
var listImg = params.list.find('img'), naviHtml = '<ul>';
$.map ( listImg, function ( img, i ) {
naviHtml += '<li>'+ img + '</li>'
//naviHtml += '<li><img width=150 height=50 src=' + $(img).attr('src') + '></li>'
})
naviHtml += '</ul>'
console.log(naviHtml);
when i console or append to body element, it giving the result as like this:
<ul><li>[object HTMLImageElement]</li><li>[object HTMLImageElement]</li><li>[object HTMLImageElement]</li><li>[object HTMLImageElement]</li><li>[object HTMLImageElement]</li><li>[object HTMLImageElement]</li><li>[object HTMLImageElement]</li><li>[object HTMLImageElement]</li></ul>
since i am not getting the images, how can i make the htmlimageElement object to html regular element?
1 Answer