jquery - how to append ajax html response in IE 8 -
i have below code in ajax call, success part returning html, , set 2 variables sift through response particular html, take that, , loop through append dom. in internet explorer version 8 only, won't append anything. there no javascript errors either. not sure if it's loop self of way getting results, towards proper approach appreciated.
success: function(data) { var results = $(data).find('li.post'); var nextgroup = $(data).find('a.page-next').attr('href'); if(!nextgroup) { $.each(results, function(index,value) { $('#posts').append(value); }); params('end'); } else { params(nextgroup); $.each(results, function(index,value) { $('#posts').append(value); }); } }
Comments
Post a Comment