Javascript 点击按钮弹出
我已经用一个插件制作了一个照片库,我想在用户点击我的主页按钮时显示这个图库 我不知道如何做到这一点,请在这里帮助我 这是我的按钮代码:Javascript 点击按钮弹出,javascript,jquery,html,css,Javascript,Jquery,Html,Css,我已经用一个插件制作了一个照片库,我想在用户点击我的主页按钮时显示这个图库 我不知道如何做到这一点,请在这里帮助我 这是我的按钮代码: <div class="ow-button-base ow-button-align-center"> <a class="ow-button-hover" target="_blank" id="introduction" onclick="intro_on"> <span>Click me to s
<div class="ow-button-base ow-button-align-center">
<a class="ow-button-hover" target="_blank" id="introduction" onclick="intro_on">
<span>Click me to see gallery</span>
</a>
</div>
单击我查看图库
这是我的照片库代码:
<div class="huge_it_slideshow_image_wrap_1" style="max-height: 1800px; overflow: visible;">
<div id="huge_it_loading_image_1" class="display" style="display: none;"></div>
您可以使用jQuery show()函数: $(“.ground_it_slideshow_image_wrap_1”).show()
但是您需要在css文件中将显示设置为无。对于这个简单的任务,您不需要jquery 在文档底部输入一个脚本标记,其中包含一些javascript代码
<script>
function intro_on() {
document.getElementById("huge_it_loading_image_1").style.display = 'block';
};
</script>
函数简介(){
document.getElementById(“巨大的图片加载”).style.display='block';
};
您还需要将html中的onclick更新为“intro_on()”,以便它可以作为javascript函数执行
<script>
function intro_on() {
document.getElementById("huge_it_loading_image_1").style.display = 'block';
};
</script>