Skip to content

Instantly share code, notes, and snippets.

@artpolikarpov
Created June 8, 2014 13:50
Show Gist options
  • Save artpolikarpov/9ee203a3c361d8a52c2a to your computer and use it in GitHub Desktop.
Save artpolikarpov/9ee203a3c361d8a52c2a to your computer and use it in GitHub Desktop.
var data = [{img: '1.jpg', html: '<div><a></a></div>'}, {img: '2.jpg', html: '<div><a></a></div>'}]
loaded;
$('#fotorama')
.on('fotorama:load fotorama:error', function (e, fotorama) {
if (!loaded) fotorama.load(data);
loaded = true;
})
.fotorama({
data: [data[0]]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment