在图像上显示div点击Galleria.io

时间:2017-04-11 18:24:46

标签: jquery galleria

我已经在这三天了,真的花时间寻求帮助。我正在全屏运行galleria,我希望能够在点击时显示隐藏的div。我将图像包裹在一个div中并尝试按照下图所示调用它,但我尝试过的任何东西似乎都没有用。我错过了什么

<div class="galleria">

 <div id ='showdiv'>
 <img src=\"$fullpath\",data-description=\"$datadescr\">
 </div>

 </div>
<script>
$(function() {
Galleria.loadTheme('http://example.net/galleria.fullscreen.min.js');
Galleria.run('.galleria', {
transition: 'fade',
imageCrop: false
});
});
</script>


<script>
$(document).ready(function() {
$('#showdiv').click(function(){
 alert("try");
//show div function
});
});
</script>

1 个答案:

答案 0 :(得分:0)

创造了一个小提琴:https://jsfiddle.net/kf5521kx/2/

点击图片调用Galleria。

interface IMap<T> {
    [key: string]: T
}

type CSSPropertyValue = string | number | CSSPropertiesBase;

interface CSSPropertiesBase extends IMap<CSSPropertyValue>
{

}

interface CSSProperties extends CSSPropertiesBase
{
    marginLeft?: string|number;
}
相关问题