I'm using jQuery to load pages into a div - instead of using iframes.
The code works great (feel free to reuse!) However, I have an issue where I cannot display a page when someone visits the URL.
So on page load, the canvas is empty (next to the menu) until the visitor clicks a link.
here is the code
<script>
$('[data-target]').click( function (e) {
$.get($(this).attr('href'), function(data){
$('#halloffame').empty();
$(data).find(".partner_body").appendTo("#halloffame");
});
e.preventDefault(); // prevent anchor from changing window.location
});
</script>
What I want to show is page-a.html whenever the page is visited - so the page doesn't look so empty.
Does anyone have any ideas?
Many thanks in advanced :)
Dan