开发者

jQuery Address Plugin - Not allowing loading ajax?

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开发者_C百科 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!


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');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜