Jquery-UI Dialog - on the fly without DIV

前端 未结 5 584
情话喂你
情话喂你 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:53

    I hope this helps somebody, you can pass html to dialog directly, like this:

    $("

    Hello World!

    ").dialog();

    so this way you don't have to have a pre-builded div, you could use:

    $("
    My div content
    ").dialog();

    EDIT: changed end tag to

    instead of

提交回复
热议问题