I am not following what you want exactly, however, this is easily accomplished with jQuery. You can either use the toggle() method or add and subtract css classes with the click() method. The best way would be to add a classname to each of the links like this:
Code:
<div id="main"></div>
<a href="page1.html" class="pager">Page One</a>
<a href="page2.html" class="pager">Page Two</a>
<script>
jQuery(document).ready(function() {
jQuery(".pager").click(function() {
jQuery("#main").load(jQuery(this).attr('href'));
});
});
</script>
In this example, I did something a little different than you described. When you click the link it will use ajax to load the content from the page in the link href attribute to the main div. I am assuming that this would accomplish the same goal without having to have all of the content included in the page by default.