Skip to content

Suggestion: Any way to show some loading type behaviour #1

@sunscreem

Description

@sunscreem

This is GREAT. Thank you for sharing.

One minor issue. I needed to provide some feedback that something was happening when a user clicks on the button to start showing the modal.

I ended up with this slightly messy method of adding another overlay and removing it when the modal's overlay was shown.

$(".help-modal").on('click', function (e) {
    $("body").append('<div class="overlay"></div>');
    $('.overlay').fadeTo( "fast", 0.5 ); 
    $.loadmodal({
        url: $(this).data('modal-url'),
        id: 'myModal',
        title: $(this).data('modal-title'),
        width: $(this).data('modal-width'),
        onShow: function(){
            $('.overlay').fadeOut(500,function(){ $(this).remove(); });
        },
        buttons:{
            close:function(){}
        }
    });
});

I'm wondering if you've come up with a cleaner way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions