marcelodolza / iziToast

Elegant, responsive, flexible and lightweight notification plugin with no dependencies.

Home Page:http://izitoast.marcelodolza.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

prevent page scroll to top

afsharmn opened this issue · comments

hi,
when popup appears , the hole html scroll goes top.
how can i prevent this this ?

i using it like this :

`
$('#elementId').click(function (e) {

        iziToast.question({
            timeout: 10000,
            rtl: true,
            close: false,
            overlay: true,
            id: 'elementId',
            displayMode: 'once',
            title: 'title',
            message: 'message',
            position: 'center',
            buttons: [
                ['<button>txt</button>', function (instance, toast) {
                    instance.hide({transitionOut: 'fadeOut'}, toast, 'button');
                }],
                ['<button><b>txt</b></button>', function (instance, toast) {
                    //my code
                    instance.hide({transitionOut: 'fadeOut'}, toast, 'button');
                }, true],
            ]
        });

        setTimeout(function () {
            $('.iziToast-overlay').click(function () {
                iziToast.hide({
                    transitionOut: 'fadeOutUp'
                }, document.querySelector('.iziToast'));
            });
        }, 1000)

})

`