我有1到3个复选框,默认情况下它们都被禁用.为了使提交按钮处于活动状态,必须选择最小复选框.有人可以帮助我使用
jquery片段来实现这一目标吗?我的标记看起来像这样,网站使用jquery 1.42.谢谢,麻烦您了!
<form action="/cart/add" method="post" id="pform"> <h3 class="goudy">Make your selection:</h3> <ul id="variants"> <li> <input type="checkBox" name="id[]" value="39601622" id="radio_39601622" style="vertical-align: middle;" class="required" /> <label for="radio_39601622[]">$38.00 - Original Antique Photo</label> </li> <li> <input type="checkBox" name="id[]" value="39601632" id="radio_39601632" style="vertical-align: middle;" class="required" /> <label for="radio_39601632[]">$8.99 - SCAN</label> </li> <li> <input type="checkBox" name="id" value="39777962" id="radio_39777962" style="vertical-align: middle;" class="required" /> <label for="radio_39777962">$2.99 - Rigid Sleeve</label> </li> </ul> <div class="buttons clearfix"> <input type="image" src="../images/add-to-cart.png" name="add" value="Add to Cart" id="add" class="send-to-cart" /> </div> </form>