Comments (3)
Fotorama has its own preloader, four running dots.
To see it at the very beginning you have to reserve space on the page by specifing dimensions. Also you can see it when you jump to the not-loaded region, for example from 1 to 4 image:
It is by design that the hidden fotorama does not start. Try another way to hide it, something like:
.fotorama {
position: absolute;
left: -9999px;
top: -9999px;
}
The fotorama:ready
event always come before any fotorama:load
. So If you still want you own preloading animation, use this snippet:
$('.fotorama').on('fotorama:load', function (e, fotorama, data) {
if (data.index === 0) {
// The first image has been loaded
}
});
from fotorama.
Ooookay. I got it now.
Identifying exactly what the issue was was part of the problem. What was happening was, as the anchor/image tags for the navigation thumbnails were being created, the thumbnail images were being displayed to the screen (which was annoying). This is primarily what I wanted to hide.
<div class="fotorama"
...
>
@foreach (var imageName in Model.ImageNames)
{
<a data-full="@Url.Content(Model.FullScreenImagePath + imageName)"
href="@Url.Content(Model.CarouselImagePath + imageName)">
<img alt="" src="@Url.Content(Model.ThumbnailPath + imageName)" />
</a>
}
</div>
Simply hiding those anchor tags as they're being built does the trick. Fotorama seems to subsequently put everything into place after it's ready; no need to manually re-show the anchor tags. And I can still hide my custom .png animation with fotorama's ready event.
.fotorama a
{
display: none;
}
My apologies. Thank you for the explanations, though.
from fotorama.
You are clever. On fotorama.io I did the similar trick:
.fotorama > * {
visibility: hidden;
}
.fotorama > .fotorama__wrap {
visibility: visible;
}
But it is not included to the fotorama.css
because I don’t want to break no-javascript compatibility by default. But this is subject to rethink.
from fotorama.
Related Issues (20)
- Внедрение fotorama в wordpress
- Caption always inside image (left) HOT 1
- Wrong direction logic for 'data-click="true"' with 'data-direction="rtl"'
- How open fullscreen when clicking on a large active picture?
- Is it possible to alter the iframe tag for Videos
- How to set fullscreen zoom size?
- Vimeo Video Not Working/Stopped Loading HOT 5
- Exit full screen mode throws js error
- Youtube thumbnail preview quality
- hidden thumbnails at small devices
- All Icons Are Same HOT 1
- Custom Thumbnails?
- Multiple galleries on one page — arrow key doesn't work on second one?
- fotorama.io not loading HOT 1
- Set amount of images diferent on default and on fullscreen
- Маленький формат галереи при первой загрузке странице
- How to force play and not download the video
- Different thumbnail size according to screen resolution
- Navigation arrows when video is loaded? HOT 1
- Is this lib reached end-of-life cycle HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fotorama.