Automatically Showing controls
njiels opened this issue · 4 comments
Hi, sorry if this is kind of a simple question but is there any way to showing the controls automatically when refreshing/entering a page? Right now I have to click on the image for it to show the controls. This is not very user friendly.
Also, is there any way for buying you a coffee ;) chocolat has helped me out a lot!
Hello,
You want to open the image as soon as you arrive on the page ?
Then this issue may help you : #71
It should look like this :
$(document).ready(function () {
var instance = $('#your-selector').Chocolat({
// ...
})
instance.api().open()
})
Did I understand you question correctly ?
I'm glad you're enjoying Chocolat! (but there is no way of buying me a coffee 😅)
Thanks for answering so fast, and sorry for answering so late myself. This opens the gallery fullscreen, but i want the gallery to be showed in a container, but right now it only shows a thumbnail (so without controls). The result i'm aiming for is something like the in-container example on the chocolat website.
First you have to define an html element that will be your contained, for example :
<div id="chocolat-container" style="width: 800px; height: 600px;"></div>
then you can use the setting container
like this :
$(document).ready(function () {
var instance = $('#your-selector').Chocolat({
contained: '#chocolat-container'
})
instance.api().open()
})
Closing due to inactivity.
Feel free to reopen