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?

Était-ce utile?

La solution 2

I found answer in source code.

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

Autres conseils

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top