Hi,
I have a webpage at http://www.optiekmeulemeester.be/normal with sliding navigation. This happens with the following code:
$(".link").click(function(){
var link = $(this).attr('href');
$("#middle").scrollTo(link, 800);
return false;
});
This works, but now I'm trying to enable the Back Button by using jQuery Address (http://www.asual.com/jquery/address/). My code has changed to this:
$.address.change(function(event){
var link = event.pathNames[0] || '#panel1';
if(link != '#panel1'){ link = '#' + link;}
$("#middle").scrollTo(link, 800);
});
The code for all .link clicks is commented out also the return false.
My back button gets enable and mostly it works as you can see and test at http://www.optiekmeulemeester.be/test. I'm sure it needs tweaking for special cases but before I get into that, the big problem is that my animation is not working anymore.
*edit: i now see that sometimes it works, and sometimes it doesn't. Can't find a logic into it. As well as clicking on the links as through the back button?!? Anyone get's my error?
Is this because the call for the animation comes after the address changes through the standard a(nchor) behavior?
Thanks in advance.