Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent page scroll to top #218

Open
afsharmn opened this issue Jun 12, 2024 · 0 comments
Open

prevent page scroll to top #218

afsharmn opened this issue Jun 12, 2024 · 0 comments

Comments

@afsharmn
Copy link

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)

})

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant