I have a jquery ajax which returns some html as data.
success: function(data){
$('#ajaxresponse ul.display li input').each(function(index) {
ajax response is a div which comes from jquery ajax success data. How to get the html from the response?
You can use find() method in jQuery
success: function(data){
$(data).find('#ajaxresponse ul.display li input').each(function(index) {
........................
});
Documentation:http://api.jquery.com/find/
you can append it to your html DOM where your want it to go, then do as you do now:
success: function(data){
$("#YourDiv").after(returnValue);
$('#ajaxresponse ul.display li input').each(function(index) {
where returnValue is a var containing the data returned by your ajax
$(data).find('ul.display li input')