views:

336

answers:

1

I am trying to test the jQuery Address Plugin and it seems to not allow ajax to work in the change function.

I am using:

$.address.change(function(event) {
    $('#content').load(event.value+' #content');
    $.address.title(event.value);
});
$('a').click(function() {
    $.address.value($(this).attr('href'));
});

While I can use event.value for other things, it just does not seem to let the .load() function work. Even trying a static URL in .load() does nothing. Is something in the plugin preventing this? I thought this was the point of the plugin!

A: 

Try using event.pathNames instead, I think you cant get this to work because you are not replacing the "/" from the value. Using event.pathNames you dont have to do that....

$('#content').load(event.pathNames+'.htm #content');
Dale Davies