I am trying to put some HTML in an array for an ajax query, but when I see array in console then there is only first line of the html. why ? is there a proper way to do this?
My code
var data = new Array();
$('.get_html').each(function() {
var html = $(this).html();
data.push(html);
});
console.log(data);
var data = $('.get_html').map(function () { return $(this).html();//return this.innerHTML }).get();see jsfiddle.net/arunpjohny/YMaSJ/2