user3230561
user3230561

Reputation: 445

jQuery Dialog Chrome issue

I am using a jQuery dialog box. I am facing an issue in Chrome browser.

 $("#dialog").append('<p class="elms">This is step 1</p>');

I have written js code where in, I am appending new content to the dialog box that is opened up. But I have ajax request after the append statement.

jQuery.ajax({
         type : "post",
         dataType : "json",.... 

What it does on Chrome is that the dialog box does not reflect the "This is step 1 message".

But it only displays the final result returned by jquery.ajax.

In Firefox browser "This is step 1 message". is shown also followed by the result returned from jquery.ajax call.

How do i fix this issue?

Upvotes: 0

Views: 126

Answers (1)

Tuhin
Tuhin

Reputation: 3373

recall .dialog();

 $("#dialog").append('<p class="elms">This is step 1</p>');
 $("#dialog").dialog();

if doesn't work for you, try this:

 $("#dialog").append('<p class="elms">This is step 1</p>').dialog();

FIDDLE HERE

Upvotes: 1

Related Questions