Comments (14)
API docs are on the way. There are a few examples, where you can see some of the special Fotorama events and methods in action:
- Start & stop button
- Events example
- List of events
- Next, previous and goto API methods
- Stop fotorama at the last image
Back to your question: CSS is the better way to change thumbnails border width and color. I am not planning to add options or methods to change thumbs border.
from fotorama.
Is there a way to load JSON data into Fotorama 4 like it was possible for Fotorama 3?
Really liking Fotorama4, started playing around with Fotorama 3 when 4 was released, which is nice.
from fotorama.
Dear @joshuataylor, sure.
Take some empty div
:
<div id="gallery"></div>
And then:
// Initialize fotorama in it
var $gallery = $('#gallery').fotorama({nav: 'thumbs'}),
// Get access to the API
fotorama = $gallery.data('fotorama');
// Load photos
fotorama.load([
{img: '1.jpg', thumb: '1-thumb.jpg'},
{img: '2.jpg', thumb: '2-thumb.jpg'},
{img: '3.jpg', thumb: '3-thumb.jpg'}
]);
The complete image object may look like so:
{
img: '1.jpg',
thumb: '1-thumb.jpg', // if you are using the `nav:'thumbs'` option
full: '1-full.jpg', // separate image for the fullscreen mode
id: 'one', // custom anchor, used with the `hash:true` option
fit: 'cover' // override the global fit option
}
from fotorama.
{
img: '1.jpg',
thumb: '1-thumb.jpg', // if you are using the `nav:'thumbs'` option
full: '1-full.jpg', // separate image for the fullscreen mode
id: 'one', // custom anchor, used with the `hash:true` option
fit: 'cover' // override the global fit option
}
если это полный список, как передать caption и html ?
from fotorama.
Попробуйте:
{
caption: 'Good caption'
html: $(el) // or '<div>123</div>'
}
from fotorama.
Спасибо!
from fotorama.
Take some empty div
As I see in code, If Fotorama is initialized on empty div
then it destroy itself immediately. Is it an issue or behavior “by design”?
from fotorama.
@mistakster, it is by design, fotorama.load()
will revive the instance.
from fotorama.
@artpolikarpov, actually, it remove empty div
from document and sometimes return undefined
for data('fotorama')
. Please, take a look at console while running http://jsfiddle.net/k6dnC/
from fotorama.
@mistakster, let’s continue here: #42.
from fotorama.
@artpolikarpov how can I add start & stop button on fullscreen mode? Thanks in advance.
from fotorama.
@samu1241 what is particularly difficult?
from fotorama.
Hello, Artem!
Thank you for your great work and sharing it with the community.
Can you, please, give me an advice on one thing.
I'm using Fotorama Wordpress plugin and I would like to achieve the same behaviour as you're showing here - http://fotorama.io/examples/events.html - a gallery with an images counter instead of the dots.
What would you say is the best way to do this?
from fotorama.
Found a solution.
Added the following code to fotorama-wp.js:
$('.fotorama--wp')
.fotoramaWPApapter()
// what I added starts here
.on('fotorama:ready', function (e, fotorama, direct) {
$(this).prepend("<mark class='position_indicator'></mark>");
$(this).find('.position_indicator').text((fotorama.activeIndex + 1)
+ '/' + fotorama.size);
})
.on('fotorama:show', function (e, fotorama, direct) {
$(this).find('.position_indicator').text((fotorama.activeIndex + 1)
+ '/' + fotorama.size);
})
// what I added ends here
.fotorama();
This also works with several Fotoramas on a page.
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.