Skip to content

How do I add a fullscreen button for an iFrame display? #421

Answered by fancyapps
mattbarnicle asked this question in Q&A
Discussion options

You must be logged in to vote

The toolbar is enabled by default only for galleries that contain images, you can use option enabled: true to enable it for any content (https://fancyapps.com/fancybox/plugins/toolbar/#toolbar):

new Fancybox(
  [{
    src: "your-url",
    type: 'iframe',
  }],
  {
    Toolbar: {
      enabled: true,
      display: {
        right: [ "fullscreen", "close" ],
      },
    },
  }
)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mattbarnicle
Comment options

Answer selected by mattbarnicle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants