var mode = $(this).data('showmode');
if (mode === 'exclusiveshow') {
- $('div.link[data-hidden="1"].show').removeClass('show');
+ $('div.link[data-hidden="1"].show').each(function () {
+ $this.hidePlacedLink(this);
+ });
}
- var l = $('div.link[data-id="' + $(this).data('showid') + '"');
+
+ var close = $(this).data('showclose');
+ var l = $('div.link[data-id="' + $(this).data('showid') + '"]');
+ $(l).append('<a href="#" class="linkshowclose ' + close + '"></a>');
$(l).show();
$(l).trigger('fluidbook.link.show');
+ if (close !== 'none') {
+ $(l).removeClass('notinteractive');
+ $(l).find('img').css('pointer-events', 'none');
+ }
setTimeout(function () {
$(l).addClass('show');
}, 10);
return false;
});
+ $(document).on('click touchend', '.linkshowclose', function () {
+ var id = $(this).closest('[data-id]').data('id');
+ $('div.link[data-id="' + id + '"]').each(function () {
+ $this.hidePlacedLink(this);
+ });
+ return false;
+ });
+
$(document).on('click touchend', '.textpopup', function () {
$this.fluidbook.menu.__openView('text', $(this).data('text'), function () {
});
},
+
+ hidePlacedLink: function (p) {
+ if ($(p).length === 0) {
+ return;
+ }
+ $(p).hide();
+ $(p).removeClass('show');
+ $(p).find('.linkshowclose').remove();
+ },
+
initLinks: function (pageNr) {
if (pageNr === undefined) {
el.removeClass('animating').css('opacity', '');
}
- var speed=0.5;
+ var speed = 0.5;
var timeline = new TimelineMax();
var repetitions = this.fluidbook.datas.linkBlinkRepetition - 1;
el.addClass('animating');