我在这里有一个投资组合部分...... http://bvh.delineamultimedia.com/?page_id=2和 Superbox - (http://toddmotto.com/introducing-superbox-the-reimagined-lightbox-gallery/)正在工作但是在我点击流沙“过滤器”链接后,超级框似乎被禁用了。有没有办法来解决这个问题。这是JavaScript。我有点困惑为什么会这样。我猜流沙有点贪心,但我不确定。
先谢谢了!
;(function($) {
$.fn.SuperBox = function(options) {
var superbox = $('<div class="superbox-show"></div>');
var superboximg = $('<img src="" class="superbox-current-img">');
var superboxclose = $('<div class="superbox-close"></div>');
superbox.append(superboximg).append(superboxclose);
return this.each(function() {
//$('.superbox-list').click(function() {
$('.superbox').on('click', '.superbox-list', function() {
var currentimg = $(this).find('.superbox-img');
var imgData = currentimg.data('img');
superboximg.attr('src', imgData);
if($('.superbox-current-img').css('opacity') == 0) {
$('.superbox-current-img').animate({opacity: 1});
}
if ($(this).next().hasClass('superbox-show')) {
superbox.toggle();
} else {
superbox.insertAfter(this).css('display', 'block');
}
$('html, body').animate({
scrollTop:superbox.position().top - currentimg.width()
}, 'medium');
});
$('.superbox').on('click', '.superbox-close', function() {
$('.superbox-current-img').animate({opacity: 0}, 200, function() {
$('.superbox-show').slideUp();
});
});
});
};
})(jQuery);