Ajax navigation menu (code source)


js File to loading content via a menu, without refresh page using Ajax

app.js
 /* Tutu4free.com  
   Ajax Navigation Menu  
 */  
 jQuery(document).ready(function($) {  
      $("a").click(function(event) {  
           link=$(this).attr("href");  
           $.ajax({  
                url: link,  
           })  
           .done(function(html) {  
                 $("#page").empty().append(html);  
           })  
           .fail(function() {  
                console.log("error");  
           })  
           .always(function() {  
                console.log("complete");  
           });  
           return false;  
      });  
 });