How to keep elements non-refreshed

From what you said I think I might have found the solution you’re looking for – you want to load content dynamically whilst keeping the logo and navigation untouched? If so, this might be what you’re looking for.

In the example, the pages are loaded in from a div within the page but could be used to load another URL or file:

$('.viewport ul li a').on('click', function(e) {
   e.preventDefault();
   var link = this.hash.substring(1, this.hash.length);
   if($('.'+link).length) {
     $('.viewport span.body').html($('.'+link).html());
   }
});

Leave a Comment