How to attach callback to jquery effect on dialog show?

前端 未结 5 855
谎友^
谎友^ 2020-11-29 07:40

My problem is that I do not know how to attach callback to the jquery ui dialog show.

The show is actually an option:

$( \".selector\" ).dialog({ sh         


        
5条回答
  •  余生分开走
    2020-11-29 07:57

    Update 2015-07-27 For anyone using jQuery v1.10.0 or above please see this other answer as my solution will not work with newer versions of jQuery.


    Original answer

    Already answered but since I had an answer, I'm going to post it anyway…

    $('#dialog').dialog({
        show: {
            effect: 'slide',
            complete: function() {
                console.log('animation complete');
            }
        },
        open: function(event, ui) {
            console.log('open');
        }
    });
    

    Shows open followed by animation complete in the Console

提交回复
热议问题