I load a second page with ajax and want to append a specific id from that page onto the current page.
function Content() {
$("ul.tabs li a").click(function() {
$.ajax({
url: $(this).attr('href'),
success: function(response) {
$(response).find('ul#image-gallery-items').appendTo('ul#image-gallery-items');
}
});
return false;
})
}
what am I missing?
You can also load page fragments with jQuery
loadfunction:In this case to append elements you can use: