Skip to content Skip to sidebar Skip to footer

How Can I Execute The Events In Sequence In Jquery Ajax Function

I have this function $.ajax({ type: 'GET', url: myurl, success: function (data) { $('#dialog-confirm').html(data); $('#dialog-confirm').dialog('open');

Solution 1:

It does, because .html is synchronous.

If it's not doing that then we need more information.

Solution 2:

$.when(// your first function).then(// your second function); You can also do it with chaining $('#dialog').html('something').dialog('open');

Post a Comment for "How Can I Execute The Events In Sequence In Jquery Ajax Function"