SWFAddress and AJAX
I'd like to use SWFAddress in an AJAX project. On the web site there are some examples but any tutorial. Do yo开发者_JAVA技巧u know where I can find a quick guide to implement SWFAddress on my web site?
Thanks
I haven't found any docs either, but i guess this is the easiest way to implement it:
1- Add this function in your document.ready()
SWFAddress.onChange = function() { //on url change
try {
var thePath = SWFAddress.getPathNames(); //get&split url
if (thePath[0] == 'one') go('one'); //if url is #one do something
if (thePath[0] == 'two') go('two'); //if url is #two do something
} catch(e) {}
}
2- Add appropriate anchors on your links (a href="#one").
精彩评论