1$('#main-menu a').on('click', function(event) {
2 event.preventDefault();
3
4 $.ajax(this.href, {
5 success: function(data) {
6 $('#main').html($(data).find('#main *'));
7 $('#notification-bar').text('The page has been successfully loaded');
8},
9 error: function() {
10 $('#notification-bar').text('An error occurred');
11 }
12 });
13});
14