I would like to apply a reset action to the fields of my form and I would like it when canceling the "x" span to return the border originate if it closes or cancels it with errors. Currently I only work with the "x" closing, if you do the reset but I want not only with span but with buttons work.
Current Code:
$('span').click(function (event) {
$('#selCertificacionP option').remove();
$('#selCertificacion option').remove();
$("#txtNombreP").css("border-color", "white");
$("#txtRFCP").css("border-color", "white");
$("#txtDireccionP").css("border-color", "white");
$("#txtColoniaP").css("border-color", "white");
$("#txtCiudadP").css("border-color", "white");
$("#txtEstadoP").css("border-color", "white");
$("#txtPaisP").css("border-color", "white");
$("#txtCodigoP").css("border-color", "white");
$("#txtTelefonoP").css("border-color", "white");
$("#selCertificacionP").css("border-color", "white");
$("#txtFolioP").css("border-color", "white");
$("#txtFecInicioP").css("border-color", "white");
$("#txtFecFinP").css("border-color", "white");
});
I would like to pass two paramters or three parameters to the .click de jquery event, so that from there it is applied to the button or any element that I decide.