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
}
});
});
슬림 박스는 livequery로 리바운드를 얻습니다. 슬림 박스의 다음/이전 기능을 리바 인딩하는 방법을 알지 못합니다. 나는 이것이 계속되기에 충분한 정보가되기를 바란다. 나는이 일을 정말로해야한다. 감사.