Created
December 24, 2018 07:49
-
-
Save danywalls/edd8f4a6bdba7d1233d135501ff043f8 to your computer and use it in GitHub Desktop.
Load content async with jquery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(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