Вопрос

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?

Это было полезно?

Решение 2

I found answer in source code.

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

Другие советы

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top