I explain, it happens that I want that when you accept the terms and conditions, and when you enter, show me the pop up integrated in the button, but it happens the opposite or in disorder, without chulear the checkbox or being chuleado, if or if you show me the integrated pop up.
<form method="POST" action="">
<input type="checkbox" name="aceptar" id="aceptar" >
Acepto terminos y condiciones
</form>
<button id="enviar" type="button" title="gifdpopbox_818182126315709_df0d42dea">
<span>Entrar</span>
</button>
And to validate the checkbox with JS I have the following:
$(function() { $("#enviar").click(function(event){
var seleccion = $("#aceptar")[0].checked;
if(!seleccion){
event.preventDefault();
alert("Acepta las condiciones");
}
});
});
The idea is that if the terms are not accepted, do not show anything, it will only show when the terms are accepted and then click on Enter
Thanks