0
コンテンツを動的に読み込むためにAJAX呼び出しを使用した後、次/前のボタンをSLIMBOXギャラリーで使用しようとしています。次の/前の関数を使用してAJAX呼び出しの後にスリムボックス
$(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('<span id="load">LOADING...</span>');
$('#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の次の/以前の機能を再バインドする方法はわかりません。私はこれが十分な情報であることを願っています。私は本当にこれを働かせる必要があります。ありがとう。