我在fotorama中使用ajax有两个问题
在ajax之前,我的代码是:
<div id="AjaxPhoto" class="fotorama" data-nav="thumbs" data-ratio="4/3"></div>在ajax之后,我的代码是:
<div id="AjaxPhoto" class="fotorama" data-nav="thumbs" data-ratio="4/3">
<img src="1.jpg" />
<img src="2.jpg" />
</div>在这种情况下,羊驼可以工作,也可以不起作用。
当我清除数据时,假设fotorama工作是“成功的”
$("#AjaxPhoto").empty();
$(".fotorama--hidden").remove();再加上其他的图片,美洲豹完全不能再工作了。fotorama支持ajax吗?
发布于 2015-04-08 04:23:14
当您清除照片和重新添加照片时,您需要重新初始化插件才能正常工作。
$("#AjaxPhoto").empty();
$(".fotorama--hidden").remove();
// Load the new set of Photos here
// after that the below statement will re-initialize the fotorama gallery plugin
$('.fotorama').fotorama();https://stackoverflow.com/questions/29505626
复制相似问题