Jquery-UI Dialog - on the fly without DIV

前端 未结 5 591
情话喂你
情话喂你 2020-12-15 16:12

I have what I suspect to be a simple question and after search I suspect the answer to my question to be no, but to double check...

Is it possible to use the Jquery

5条回答
  •  心在旅途
    2020-12-15 16:46

    This works for me. Note to avoid the body being filled with divs, I ensure the div used is removed after close:

    $('
    ').prop('id', '_currentDialog').text("Please enter a Comment").dialog( {      title: "Input Error",         close: function () {          $('#_currentDialog').remove();         }     } );

提交回复
热议问题