问题是:我有一个网页和两个popunders,我希望他们在有人点击页面上的特定元素时显示,我的意思是popunder1
显示点击element1
(如image1)时popunder2
显示点击element2
(如image2
)时,我该如何实现?
代码:
$(function(){
$('#image1').click(function(){
//POPUNDER1 SCRIPT HERE
$(this).hide();
});
});
$(function(){
$('#image2').click(function(){
//POPUNDER2 SCRIPT HERE
$(this).hide();
});
});

.image-wrapper {
position: relative;
}
#image1 {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 99999999;
}
#image2 {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 100;
z-index: 99999999;
}

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="image-wrapper">
<div id="image1">IMAGE1 HERE</div>
<div id="image2">IMAGE2 HERE</div>
</div>
&#13;