Zend certified PHP/Magento developer

magento2 before add to cart open popup how to?

submitForm: function (form) {
            //this.ajaxSubmit(form);
            var popup = $('<div class="add-to-cart-modal-popup"/>').html($('.page-title span').text() + '<span> has been added to cart.</span>').modal({
                modalClass: 'add-to-cart-popup',
                title: $.mage.__("Popup Title"),
                buttons: [
                    {
                        text: 'Continue Shopping',
                        click: function () {
                            this.closeModal();
                        }
                    },
                    {
                        text: 'Add To Cart',
                        click: function () {
                            this.ajaxSubmit(form);
                            
                            //return false;
                            //window.location = window.checkout.checkoutUrl
                        }
                    }
                ]
            });
            popup.modal('openModal');
        },