Hi all,
The result of an AJAX search is HTML code. How could I use a jQuery selector in the result, or create a jQuery object from it?
Thanks! :)
- doc = window.document
- jQuery.ajax({
- type: "POST",
- dataType: "html",
- url: "foobar",
- cache: false,
- error: function (XMLHttpRequest, textStatus, errorThrown) {
- alert("Error occured textStatus=" + textStatus + " errorThrown=" + errorThrown);
- },
- success: function(data) {
- jQuery('body', doc).append(jQuery('#something', data).html());
- }
- });