单击某个项目时,我正在使用 photoswipe 显示我的画廊。
我的标记:
<ul id="gallery_mobile_about">
<li>
<a href="/files/uploads/Detalle-Magrana.jpg" style="background-image: url('/files/uploads/Detalle-Magrana.jpg');" data-iframe="" data-pos="0" data-url="/files/uploads/Detalle-Magrana.jpg" class="gallery-item ui-link"></a>
</li>
<li>
<a href="/files/uploads/Figues-de-Moro.jpg" style="background-image: url('/files/uploads/Figues-de-Moro.jpg');" data-iframe="" data-pos="1" data-url="/files/uploads/Figues-de-Moro.jpg" class="gallery-item ui-link">
</a>
</li>
<li>
<a href="/files/uploads/Cala-Deià-50x30cm1-1024x782.jpg" style="background-image: url('/files/uploads/Cala-Deià-50x30cm1-1024x782.jpg');" data-iframe="" data-pos="2" data-url="/files/uploads/Cala-Deià-50x30cm1-1024x782.jpg" class="gallery-item ui-link">
</a>
</li>
<li>
<a href="/files/uploads/Deia-Church-on-Cala-rock.jpg" style="background-image: url('/files/uploads/Deia-Church-on-Cala-rock.jpg');" data-iframe="" data-pos="3" data-url="/files/uploads/Deia-Church-on-Cala-rock.jpg" class="gallery-item ui-link">
</a>
</li>
</ul>
js:
$(document).ready(function(){
var myPhotoSwipe = $("#gallery_mobile_about a").photoSwipe(
{ enableMouseWheel: false ,
enableKeyboard: false }
);
});
问题是,即使画廊似乎已加载,作为背景,我看到一个带有文本“未定义”的白页,并且在关闭画廊页面时,该白页将保留为该白页(未返回原始视图)
结果(点击图片,其中显示画廊中有 5 个项目):http ://deia.info/m/?lan=2&task=view_post&catid=14&blogid=25
我在这里似乎缺少什么?