This should be fairly simple; i'm pretty sure I've just not understood it.
FYI, the website is using jQuery to run ajax .load() on content.
On my main parent page, in the header I have my nav .load() jQuery code:-
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$('a.nav').click(function() {
page = $(this).attr('page');
projID= $(this).attr('projID');
if($("#mainRight").is(":visible")) { $('#mainRight').hide(200); }
switch(page) {
case 'projSettings': $("#mainRight").load("content.php?load=" + page, { projID: projID}); break;
case 'projMetrics': $("#mainRight").load("content.php?load=" + page, { projID: '5000227' }); break;
case 'projTags': $("#mainRight").load("content.php?load=" + page, { projID: projID}); break;
case 'projShare': $("#mainRight").load("content.php?load=" + page, { projID: '5000227' }); break;
}
$('#mainRight').show(300);
});
Now, basically I want the projID to be rememebred for use by other a.nav clicks that don't supply it.
An linked anchor calling this looks like <a page="projSettings" projID="522" class="nav">Settings</a>
and I'd it to save that 522. So, other requests (that don't have the projID, as the data has been loaded into the DOM for other navs and they don't know the projID. I hope that makes sense.
So, I'd like to know how to have links like <a page="projSettings" class="nav">settings</a>
when the projID has already been used in the previous call.
Any thoughts?