I have the following code that shows some texts when I click on a button.
Works well in all browsers except in Firefox 53.0.3 64 bits , any ideas?
$(document).ready(function(event) {
$('#btn-servicios-1').click(mostrarServicios1);
$('#cerrar-servicios-1').click(cerrarServicios1);
});
function cerrarServicios1() {
event.preventDefault();
$("#contenido-servicios-1").hide();
}
function mostrarServicios1() {
event.preventDefault();
$("#contenido-servicios-1").css("display", "flex");
}
I just tried:
$("#contenido-servicios-1").show();
$("#contenido-servicios-1").css("display", "flex");
And it does not work either
I've tried only with
$("#contenido-servicios-1").show();
And it's not going either, it's not a matter of using show();
or .css(display)
.
PS: SOLVED
function cerrarServicios1(event) {
event.preventDefault(event);
$("#contenido-servicios-1").hide();
}
function mostrarServicios1(event) {
event.preventDefault(event);
$("#contenido-servicios-1").css("display", "flex");
}
In the end I solved it by adding 'event' in the functions. Thank you all for the inconvenience.