Skip to content

Instantly share code, notes, and snippets.

@danywalls
Created December 24, 2018 07:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danywalls/edd8f4a6bdba7d1233d135501ff043f8 to your computer and use it in GitHub Desktop.
Save danywalls/edd8f4a6bdba7d1233d135501ff043f8 to your computer and use it in GitHub Desktop.
Load content async with jquery
$(document).ready(function(){
//global function to able load all content by ajax.
$('a').bind('click', function(e) {
var url = $(this).attr('href');
$('div#container').load(url);
e.preventDefault();
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment