此代码创建了一个卡片组件,但阅读更多按钮折叠了所有卡片,但我只想在单击按钮时在每张卡片中单独折叠。
{% for job in jobs%}
<div class="card w-100 mb-2">
<div class="jobs card-body">
<h5 class="card-title">Position: {{ job.title }}</h5>
<h6 class="card-title font-weight-normal">Location: {{ job.location }}</h6>
<p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
<button type="button" class="btn btn-info" data-toggle="collapse" data-target="#demo">Read More</button>
<a href="#" class="btn btn-primary">Apply</a>
<div id="demo" class="collapse">
<hr>
<h6 class="">Requirements</h6>
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</div>
</div>
</div>
{% endfor%}
慕斯709654
拉丁的传说
相关分类