Skip to content

How to use Modal pop-up and confirm pop-ups widgets #52

Discussion options

You must be logged in to vote

Static html example:

<button class="button primary modal-opener">Show popup</button>

<div style="display:none" data-mage-init='{
        "Magento_Ui/js/modal/modal": {
            "trigger": ".modal-opener"
        }
    }'>
    Modal content
</div>

JS example:

$('.selector').modal();
$('.selector').modal('openModal');

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Magnetoabhi
Comment options

Answer selected by Magnetoabhi
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants