Skip to content

How can i show a Loading Spinner while loading data-type="iframe" #638

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

You must be logged in to vote

Hi,

The loading spinner is displayed by default when the page is preloading. If you set data-preload="false", the page is not preloaded and is displayed "as is".

If you can control content of your page, then you could display loading icon by yourself.

Or you could force to display loading icon using this code snippet:

Fancybox.getInstance().showLoading(Fancybox.getSlide())

btw, if you do that and wonder why conter is not visible, then it is due to this CSS snippet:

.is-loading .fancybox__content {
    opacity: 0;
}

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by mDesignHub
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
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