隐藏第一部分
Hide first Section
我有以下代码。我希望在单击按钮时隐藏第一部分。
有人可以帮忙吗?
提前致谢
</div>
<img src="https://sampleurl.com/wp-content/uploads/2021/02/Brief.png" style="width:150px;height:91px;" /><br />
<style type="text/css">.myimgdivtoggle{ display:none;}
</style>
<script>$(document).ready(function(){ $('.togglebtn').click(function(){ $('.myimgdivtoggle').toggle(); });});</script><button class="togglebtn" type="button"><span class="cp_responsive cp_font" data-font-size="20px" style="font-size:20px;"><span data-font-size="18px"><span data-font-size="22px"><span data-font-size="20px"><span data-font-size="19px"><span style="font-family:lato;"><span style="color:#FFFFFF;" date-dismiss=“modal“ arialabel=“Close“>JETZT LESEN</span></span></span></span></span></span></span></button>
<div class="myimgdivtoggle"><img alt="display image on button click" class="img-responsive img-thumbnail" src="https://sampleurl.com/wp-content/uploads/2021/03/Krankmeldung_neu.jpg" /></div> ```
您去过 select 两个图像元素并反向切换每个元素。
<div class="myimgdivtoggle2">
<img src="https://sampleurl.com/wp-content/uploads/2021/02/Brief.png" style="width:150px;height:91px;" /><br />
</div>
<button class="togglebtn" type="button">
<span class="cp_responsive cp_font" data-font-size="20px" style="font-size:20px;">
<span data-font-size="18px">
<span data-font-size="22px">
<span data-font-size="20px">
<span data-font-size="19px">
<span style="font-family:lato;">
<span style="color:#FFFFFF;" date-dismiss=“modal“ arialabel=“Close“>
JETZT LESEN
</span>
</span>
</span>
</span>
</span>
</span>
</span>
</button>
<div class="myimgdivtoggle">
<img alt="display image on button click" class="img-responsive img-thumbnail" src="https://sampleurl.com/wp-content/uploads/2021/03/Krankmeldung_neu.jpg" />
</div>
<style type="text/css">
.myimgdivtoggle2{
display:none;
}
</style>
<script>
$(document).ready(function () {
$( ".togglebtn").click(function () {
$( ".myimgdivtoggle" ).toggle();
$( ".myimgdivtoggle2" ).toggle();
});
});
</script>
我有以下代码。我希望在单击按钮时隐藏第一部分。 有人可以帮忙吗?
提前致谢
</div>
<img src="https://sampleurl.com/wp-content/uploads/2021/02/Brief.png" style="width:150px;height:91px;" /><br />
<style type="text/css">.myimgdivtoggle{ display:none;}
</style>
<script>$(document).ready(function(){ $('.togglebtn').click(function(){ $('.myimgdivtoggle').toggle(); });});</script><button class="togglebtn" type="button"><span class="cp_responsive cp_font" data-font-size="20px" style="font-size:20px;"><span data-font-size="18px"><span data-font-size="22px"><span data-font-size="20px"><span data-font-size="19px"><span style="font-family:lato;"><span style="color:#FFFFFF;" date-dismiss=“modal“ arialabel=“Close“>JETZT LESEN</span></span></span></span></span></span></span></button>
<div class="myimgdivtoggle"><img alt="display image on button click" class="img-responsive img-thumbnail" src="https://sampleurl.com/wp-content/uploads/2021/03/Krankmeldung_neu.jpg" /></div> ```
您去过 select 两个图像元素并反向切换每个元素。
<div class="myimgdivtoggle2">
<img src="https://sampleurl.com/wp-content/uploads/2021/02/Brief.png" style="width:150px;height:91px;" /><br />
</div>
<button class="togglebtn" type="button">
<span class="cp_responsive cp_font" data-font-size="20px" style="font-size:20px;">
<span data-font-size="18px">
<span data-font-size="22px">
<span data-font-size="20px">
<span data-font-size="19px">
<span style="font-family:lato;">
<span style="color:#FFFFFF;" date-dismiss=“modal“ arialabel=“Close“>
JETZT LESEN
</span>
</span>
</span>
</span>
</span>
</span>
</span>
</button>
<div class="myimgdivtoggle">
<img alt="display image on button click" class="img-responsive img-thumbnail" src="https://sampleurl.com/wp-content/uploads/2021/03/Krankmeldung_neu.jpg" />
</div>
<style type="text/css">
.myimgdivtoggle2{
display:none;
}
</style>
<script>
$(document).ready(function () {
$( ".togglebtn").click(function () {
$( ".myimgdivtoggle" ).toggle();
$( ".myimgdivtoggle2" ).toggle();
});
});
</script>