if (args[1] === 'closeview') {
return this.setCurrentPage(this.currentPage);
} else if (args[1] === 'page') {
+ var anchor = false;
if (fluidbook.settings.pageLabels[args[2]] !== undefined) {
page = fluidbook.settings.pageLabels[args[2]];
+ anchor = args[2];
} else {
page = parseInt(args[2]);
}
+
if (isNaN(page) || page == undefined) {
return this.setCurrentPage('1');
}
this.currentPageURL = page;
- var anchor = false;
- if (args.length > 3) {
- anchor = args[3];
- }
if (page !== $this.currentPage) {
$($this).trigger('fluidbook.page.navigation', [page]);
if (!this.mobilefirst.enabled) {
return;
}
- var id = $('[data-anchor="anchor"]').attr('id');
+ var id = $('[data-anchor="' + anchor + '"]').attr('id');
TweenMax.to($("#scroll"), 0.5, {scrollTo: {y: '#' + id, offsetY: $('header').outerHeight() + 10}});
},
}
var close = $(this).data('showclose');
- console.log(showid);
$.each(showid, function (k, id) {
$('div.link[data-id$="' + id + '"]').each(function () {
var l = this;
if (from.display !== undefined && from.display === 'none') {
link.hide();
}
- console.log(from, to);
if (tweenmax) {
TweenMax.fromTo(linkElement, duration, from, to);
}