Sha256: 448d1c940149c5c8efc2ab78191cc662674b406aa39c9ede99b8cfbfc44de5df
Contents?: true
Size: 990 Bytes
Versions: 64
Compression:
Stored size: 990 Bytes
Contents
(function($) { $.widget('pageflow.parentPageButton', { _create: function() { var element = this.element; var options = this.options; element.click(function(event) { pageflow.slides.goToParentPage(); event.preventDefault(); }); pageflow.slides.on('pageactivate', function(e, ui) { update(); }); update(); function update() { var pagePermaId = parseInt(pageflow.slides.currentPage().attr('id'), 10); var chapterId = pageflow.entryData.getChapterIdByPagePermaId(pagePermaId); var chapterConfiguration = pageflow.entryData.getChapterConfiguration(chapterId); var visible = pageflow.slides.parentPageExists() && chapterConfiguration.display_parent_page_button !== false; if (options.visibleClass) { element.toggleClass(options.visibleClass, visible); } else { element.toggle(visible); } } } }); }(jQuery));
Version data entries
64 entries across 64 versions & 1 rubygems