Skip to content

[Code] Refactor modals  #143

@gitgauner

Description

@gitgauner

This is absolutely not up to our standards right now:

$('#nutri_modal').click(function() {
                $("#nutriscore").css("display", "block")
                $(".container").addClass('modalIsOpen').removeClass('modalIsClosed')
                event.stopPropagation();
            });
            $('.modal_close').click(function() {
                $("#nutriscore").addClass('fadeOutDown')
                $(".container").removeClass('modalIsOpen').addClass('modalIsClosed')
                setTimeout(function() {
                    $("#nutriscore").css("display", "none")
                    $("#nutriscore").removeClass('fadeOutDown')
                    $("#nutriscore").addClass('fadeInUp')
                }, 200);
            });

Please consider using a solution that targets all modals for example with data-trigger/data-toggle or sth else.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions