Search Results

Search found 1 results on 1 pages for 'user1360694'.

Page 1/1 | 1 

  • Dialog Box Not Working properly

    - by user1360694
    function showPopup(){ var popup = $('<div>').dialog(); popup.html('<div id="mydiv"></div>'); for (var i=1; i<5; i++) setContent($('#mydiv')); popup.dialog("option", "buttons", { "Add": function(){ //code to add $(this).dialog('close'); $(this).dialog('destroy'); }, "Cancel": function(){ //code to add $(this).dialog('close'); $(this).dialog('destroy'); }, }); } function setContent(container){ container.append('<p>sadfsdfsdfsdfdsf</p>'); } On clicking a "ADD BUTTON" the showPopup function is called which displays a dialog box setting its content from the setContent method. On the first click the content is displayed properly while on further clicks(after the previous dialog is closed) no content is displayed. Can anyone help with this.

    Read the article

1