We sacrifice by not doing any other technology, so that you get the best of Magento.

We sacrifice by not doing any other technology, so that you get the best of Magento.

    You can open popup when <a> tag onClick using below code:

    div>
        <a href="#" id="click-me">Click Me</a>
    </div>
    
    <div id="popup-modal" style="display:none;">
        <h1> Hi I'm here.... </h1>
    </div>
    
    <script>
        require(
            [
                'jquery',
                'Magento_Ui/js/modal/modal'
            ],
            function(
                $,
                modal
            ) {
                var options = {
                    type: 'popup',
                    responsive: true,
                    innerScroll: true,
                    title: 'popup modal title',
                    buttons: [{
                        text: $.mage.__('Continue'),
                        class: '',
                        click: function () {
                            this.closeModal();
                        }
                    }]
                };
    
                var popup = modal(options, $('#popup-modal'));
                $("#click-me").on('click',function(){ 
                    $("#popup-modal").modal("openModal");
                });
    
            }
        );
    </script>

     

    Fill the below form if you need any Magento relate help/advise/consulting.

    With Only Agency that provides a 24/7 emergency support.

      Get a Free Quote