My current code renders the complete HTML output while in reality I only need the contents of a certain DIV, and then I want the result to fade in.
$(function(){
setInterval(function(){
$.ajax({
url: "url",
cache: false,
dataType: "html"
})
.done(function( html ) {
$( "#destination" ).html( html );
});
},1000);
});
EDIT: I am looking for a way to make this work using the $.ajax
, not with .load
or $.get
as I am trying to get a more low-level understanding of AJAX.