How can a link be conditioned?
that is, if a condition is met that is just redirected to the URL of the link, otherwise it will not.
if ($(this).is(":checked")) {
console.log("SI deberia funcionar el link");
}else{
console.log("NO deberia funcionar el link");
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<a href="/miLink"> link
<input type="checkbox" id="miCheck">
In this case that I pose, the check mark would be the condition so that the link can be enabled