嗨我有以下代碼,但無法讓它工作。我希望在複選框被選中後顯示鏈接。如果2複選框的勾選執行jquery函數
HTML:
<div><input id="dp-terms" name="terms" type="checkbox" value="1" /> I have read and agree to your terms and conditions</div>
<div><input id="dp-artwork" name="artwork" type="checkbox" value="1" /> I have read and undertand your artwork guide</div>
<div id="show-continue" style="display:none;"><a href="#">Next ></a></div>
jQuery的;
$(document).ready(function(){
$("#dp-terms, #dp-artwork").change(function() {
if ($("input#dp-terms").checked && ("input#dp-artwork").checked) {
$("#show-continue").show();
} else {
$("#show-continue").hide();
};
});
});
http://jsfiddle.net/dannyj6/EJZuC/