cant find div element in ajax data find
- by Shrey
This is my whole Ajax page which is returned
<!DOCTYPE div PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<div class="CareerAjaxData">Simple Div Content</div>
The jQuery script in the Main page which calls this Ajax page is
$.ajax({
type : 'POST',
url : url,
data : data,
datatype : 'html',
success : function(ajaxdata) {
var $tabcontent = $(ajaxdata).find('.CareerAjaxData');
console.log($tabcontent.html());
}
});
But the output of Console gives: undefined
I get proper response from the server.
But there some problem with js I guess.
whats wrong here..??