Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('body').on('click', 'a', function(e) {
- if($(this).attr("href") == "#") {
- return;
- }
- e.preventDefault();
- $('body').load( $(this).attr("href"), function( response, status, xhr ) {
- if ( status == "error" ) {
- var msg = "Sorry but there was an error loading your page: ";
- console.log(msg + xhr.status + " " + xhr.statusText );
- }
- })
- });
Add Comment
Please, Sign In to add comment