I created this code and am trying to do the inverse function, ie if it is closed, it opens, if it is open date. I'm having problems and I can not see anything on the console. Can you help me?
/////////////////////////////////////////////
$("#edit_prod").on("click", function(event) {
event.preventDefault();
////////////////////////////////
var code = $(this).data("forms");
$(".formsEditProdutos").addClass("esconde");
$(".formsEditProdutos").attr("id", code).removeClass("esconde");
}, function(event){
var code = $(this).data("forms");
$(".formsEditProdutos").attr("id", code).addClass("esconde");
});