Skip to content

Instantly share code, notes, and snippets.

@airstrike
Created October 13, 2011 20:26
Show Gist options
  • Save airstrike/1285409 to your computer and use it in GitHub Desktop.
Save airstrike/1285409 to your computer and use it in GitHub Desktop.
ajax call breaks back button, shows json instead of .html page
$.ajax({
type: 'GET',
url: document.location,
data: {},
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(fetched) {
$.each($('body#grid ul.messagelist li'), function(i, e) {
$(e).hide().fadeOut();
});
$('span.loading').remove();
initMileto(fetched);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment