ajax next(),ajax调用后使用slimbox,使用next/previous函数

我试图让使用AJAX调用动态加载内容后,下一个/上一个按钮与SLIMBOX图库一起工作。ajax调用后使用slimbox,使用next/previous函数

$(document).ready(function() {

$('.content_box').hide();

$('.sf-menuUP a').click(function(){

$('.content_box').fadeIn('slow');

});

var hash = window.location.hash.substr(1);

var href = $('.sf-menuUP li a').each(function(){

var href = $(this).attr('href');

if(hash==href.substr(0,href.length-5)){

var toLoad = hash+'.html #content';

$('#content').load(toLoad)

}

});

$('.sf-menuUP li a').click(function(){

var toLoad = $(this).attr('href')+' #content';

$('#content').fadeOut('fast',loadContent);

$('#load').remove();

$('#wrapper').append('LOADING...');

$('#load').fadeIn('normal');

window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-5);

function loadContent() {

$('#content').load(toLoad,'',showNewContent())

}

function showNewContent() {

$('#content').fadeIn('normal',hideLoader());

}

function hideLoader() {

$('#load').fadeOut('normal');

}

return false;

});

$("a[rel^='lightbox']").livequery(function(){

$(this).slimbox({/* Put custom options here */}, null, function(el) {

return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));

}), function() {

//remove slimbox? this is called when elements no longer match

}

});

});

slimbox得到反弹与livequery,我只是不知道如何重新绑定slimbox的下一个/前一个功能。我希望这是足够的信息继续下去,我真的需要得到这个工作。谢谢。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值