I've got this working pretty good right now, but there's one thing I
can't get right.
I notice in Firebug that the url is loading correctly, but when I look
at the url in the address bar of my browser, this url gets long and is
not right. I'm not sure how to fix this. Here's my code if anyone
can spot my error and help me out:
$(document).ready(function() {
$.historyInit(pageload);
$("[EMAIL PROTECTED]'history']").click(function(){
l = $(this);
var hash = l.attr('hrf');
hash = hash.replace(/^.*?/, '');
hash = hash.replace('?','-');
$.historyLoad(hash.replace('##','?'));
return false;
});
});
function pageload(hash) {
if(hash) {
hs = hash.replace(/^.*\?/,'');
var sArr = hs.split('-');
h = {};
for(i=0;i<sArr.length;i++){
h[sArr[i].split('.')[0]] = sArr[i].split('.')[1];
}
$("##load").load(hash);
}
else {
$("##load").empty();
}
}
FYI, I have two ##'s where there would normally be only one # because
this is in a Coldfusion page...