Skip to content

Instantly share code, notes, and snippets.

@user512
Created August 7, 2015 15:23
Show Gist options
  • Save user512/7502813d9c20ae645f45 to your computer and use it in GitHub Desktop.
Save user512/7502813d9c20ae645f45 to your computer and use it in GitHub Desktop.
Ajax by Derek
$("a").click(function(e) {
e.preventDefault(); // prevent default action
$.ajax{
url: $(this).attr("href"),
dataType
}).done(function(data) { // ajax call
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment