return false;
});
+ $(document).on('click touchend', '[data-showid]', function () {
+ var l = $('div.link[data-id="' + $(this).data('showid') + '"');
+ $(l).show();
+ $(l).trigger('fluidbook.link.show');
+ setTimeout(function () {
+ $(l).addClass('show');
+ }, 10);
+ return false;
+ });
+
$(document).on('click touchend', '.textpopup', function () {
$this.fluidbook.menu.__openView('text', $(this).data('text'), function () {
});
if (linksContainer !== undefined) {
container = $(linksContainer);
}
- if(additionalDelay===undefined){
- additionalDelay=0;
+ if (additionalDelay === undefined) {
+ additionalDelay = 0;
}
var animateBookmarks = (this.fluidbook.datas.bookmarkBlinkOnPageChange == true);
$(e).removeClass('animating').css('opacity', 1)
}
});
- }, delay+additionalDelay);
+ }, delay + additionalDelay);
});
clearInterval(interval);
});
$(".inlineslideshow").each(function () {
- var $this = $(this);
- var dir = 'data/links/' + $(this).data('dir') + '/';
- $.each($(this).data('images'), function (k, i) {
- var h = '<div class="slide" style="background-image: url(\'' + dir + i + '\');"></div>';
- $this.append(h);
- });
+ if ($(this).is(':visible')) {
+ $__this.initSlideshow(this);
+ }else{
- setTimeout(function () {
- $this.find('.slide:eq(0)').addClass('show');
- }, 1000);
-
- $__this.initInlineSlideshowsIntervals.push(setInterval(function () {
- var current = $this.find('.slide.show');
- var next = $(current).nextAll('.slide:not(.show):eq(0)');
- if ($(next).length == 0) {
- next = $this.find('.slide:eq(0)');
- }
+ }
+ });
+ },
- $(next).addClass('show');
- $(current).removeClass('show');
- }, parseFloat($__this.fluidbook.datas.inlineSlideshowDuration) * 1000));
+ initSlideshow: function (s) {
+ var dir = 'data/links/' + $(s).data('dir') + '/';
+ $.each($(s).data('images'), function (k, i) {
+ var h = '<div class="slide" style="background-image: url(\'' + dir + i + '\');"></div>';
+ $this.append(h);
});
+
+ setTimeout(function () {
+ s.find('.slide:eq(0)').addClass('show');
+ }, 1000);
+
+ this.initInlineSlideshowsIntervals.push(setInterval(function () {
+ var current = s.find('.slide.show');
+ var next = $(current).nextAll('.slide:not(.show):eq(0)');
+ if ($(next).length == 0) {
+ next = s.find('.slide:eq(0)');
+ }
+
+ $(next).addClass('show');
+ $(current).removeClass('show');
+ }, parseFloat(this.fluidbook.datas.inlineSlideshowDuration) * 1000));
},
resize: function () {