Question

I use fotorama with html frames. The html may change during site work. Unfortunately(?), frames disappear from page after first initialization of fotorama. So, I want to destroy fotorama, change html in frames and start it again. How can I do this?

Was it helpful?

Solution 2

I found answer in source code.

$(selector).data('fotorama').destroy()

OTHER TIPS

This is actually available from the documentation

// 1. Initialize fotorama manually.
var $fotoramaDiv = $('#fotorama').fotorama();

// 2. Get the API object.
var fotorama = $fotoramaDiv.data('fotorama');

then you'll be able to

fotorama.destroy();

Note that if the fotorama div is hidden, you'll not be able to get the API object and thus not be able to destroy fotorama.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top