好的,所以我有这个 Jquery,它将切换页面上的一些单选按钮。我想要它,所以当有人点击其中一个单选按钮时,其他人不会被点击。目前我拥有它的方式,他们一次可以选择 3 个,我需要它像一个普通的单选按钮一样,一个被点击,其他的没有
jQuery:
$(function () {
$('.box-ul .btn .dot').click(function () {
$(this).toggleClass('clicked');
});
});
HTML:
<div class="box-ul box-video right">
<ul>
<li><span class="yes"></span><p>Easy to Use</p></li>
<li><span class="yes"></span><p>Step by Step<br /><span>details instructions</span></p></li>
<li><span class="yes"></span><p>Setup time<br /><span>under 30 mins</span></p></li>
<li class="btn btn-expanded">
<div class="btn-t">
<span class="dot left"></span>
<p class="left">Expanded<br />
<span>This is the extend button It has space for slightly more info.</span>
</p>
<div class="cl"> </div>
</div>
</li>
<li class="btn">
<div class="btn-t">
<span class="dot left"></span>
<p class="left">Green Doggies</p>
<div class="cl"> </div>
</div>
</li>
<li class="btn">
<div class="btn-t">
<span class="dot left"></span>
<p class="left">Email Support</p>
<div class="cl"> </div>
</div>
</li>
</ul>
</div>