The best way according to me is to place the target content on the same page with an ID(obviously unique) <div id="generic"> ..content.. </div>
and on your <a>
tag's href
, target the required div with the ID with href="#generic"
. like so
<a href="#generic">
<h2>Magna</h2>
<div class="content">
<p>Sed nisl arcu euismod sit ame.</p>
</div>
</a>
.....
.....
.....
<div id="generic">..</div>
Additional to this add smooth scrolling to make it look like its sliding up/down to the targeted content.
To not add the #generic
to your url try using a super simple JQuery fix additional to the above code:
$("article a").click(function(e){
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 1500);
e.preventDefault(); //this is the important line.
});
I have tested this on your website & it works like a charm! Let me know if any issues.