我是这个论坛的新手,也许这个问题已经被问过了。但是,我仍然需要这个论坛尊敬的用户的帮助。让我分享我的(HTML n Jquery)编码...
jquery
$(".container").click(function(){
$(".product-view").fadeIn()
});
$(".close-button").click(function(){
$(".product-view").fadeOut()
});
</script>
HTML
<div class = "container">
<div class = "middle">
<img src = "BLUE(Linen Shirt).jpg"> </div>
<div class="on-top">
<button class="qvbtn"><b>Quick View</b></button>
</div>
</div>
<div class="product-view">
<div class="close-button"> X </div>
<div class="product-big-image">
<img src="BLUE(Linen Shirt).jpg">
</div>
<div class="product-big-desc">
<h2>Linen Shirt</h2>
<h5>Produce Code:</h5>
<h5>Brand:</h5>
<div class="price">
<h4 class="OldPrice"><del>150 SAR</del>
<sup>50% off</sup>
</h4> <!--h4 class="NewPrice">75 SAR</h4-->
</div>
</div>
</div>
答案 0 :(得分:0)
首先,不显示div包含图片。然后单击按钮显示它
for item1 in L1:
for index, item2 in enumerate(L2):
if item1 == item2:
L4.append(L3[index])
<div class="product-view" style="display: none">
$("#btnClick").click(function(){
$(".product-view").fadeIn()
});
$(".close-button").click(function(){
$(".product-view").fadeOut()
});