Stackoverflow 2012-03-17
by john_s
HTML
<input name="accept" type="checkbox" value="0">Confirmation Box</input>
<a id="koalaLink" href="http://somelink.com">
<img src="/Koala.jpg" height="94" width="94" alt="Koala" />
</a>
JavaScript
$(function() {
$('#koalaLink').click(function() {
if (!$('input[name=accept]').prop('checked')) {
alert ("You must check the box to confirm you have read and accept the Terms.");
return false;
}
return true;
});
});