Hub Hack: Display Title and Description Above Flipbook

Follow

Use this Custom Code snippet to display the Item title and description above a Flipbook.


 

Details

  • Type: JavaScript
  • Placement: Body Bottom (at Hub level) OR Item Content (at Item level)
  • Notes: By default, viewing a Flipbook in a Hub will display the Item's title (and description, if present) below the Flipbook. This JavaScript snippet simply moves those elements above the Flipbook. You can choose to apply this behaviour to all Flipbooks in a Hub by placing this snippet at the Hub level, or only to specific Items by placing it at the Item level (see the note in this article for details on this pacement). 

Code

<script>
var flipbook = document.querySelector('.single-uberflip');
var entryWrapper = document.querySelector('.entry-wrapper');
var flipbookParent = flipbook.parentNode;
flipbookParent.parentNode.removeChild(flipbookParent);
entryWrapper.appendChild(flipbookParent);
</script>
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.