Sequencing 2 lines of JQUERY

Posted by nobosh on Stack Overflow See other posts from Stack Overflow or by nobosh
Published on 2010-05-24T04:36:12Z Indexed on 2010/05/24 4:41 UTC
Read the original article Hit count: 248

Filed under:
|
|
|

I have the following lines of JQUERY:

// When dragging ends
stop: function(event, ui) {
    // Replace the placeholder with the original
    $placeholder.after( $this.show() ).remove();
    // Run a custom stop function specitifed in the settings
    settings.stop.apply(this);
},

I don't want settings.stop.apply(this); to run UNTIL the line above is $placeholder.after( $this.show() ).remove();, right now what's happening is the settings.stop is running to early.

With JQUERY, how can I Sequence these two lines to not proceed until the first is complete?

Thanks

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ui