Trying to find div element with id="result" in returned data from .ajax() using .find(). Unfortunately, alert(result) doesn't return div#result.
Here is my code:
$.ajax({
url: url,
cache: false,
success: function(response) {
result = $(response).find("#result");
alert(response); // works as expected (returns all html)
alert(result); // returns [object Object]
}
});