Posted in

Abrir magnificpopup sin evento de botón

Si queremos abrir un popup sin clicar un botón o acción previa lo podemos hacer de la siguiente forma:
Ajax

$.magnificPopup.open({
                items: {
                    src: '/admin/holiday-edit/' + calEvent.type + '/' + calEvent.id
                },
                type: 'ajax'
            }, 0);

Show popup

<div id="error-show" class="white-popup-block mfp-hide">
            <p>Elige un sticker y una temática</p>
        </div>
$.magnificPopup.open({
    items: {
       src: '#error-show'
    },
       type: 'inline'
    });

Deixa un comentari

L'adreça electrònica no es publicarà. Els camps necessaris estan marcats amb *


The reCAPTCHA verification period has expired. Please reload the page.