简体   繁体   中英

Can't make jQuery UI dialog work

I try to use jQuery UI library. I made it AMD using this plugin, and have a simple code of:

<div class="#dialog" title="Test">
    <p>Hello world!</p>
</div>

That I try to show in dialog inside backbone's render function like this:

render:function ()
        this.$el.html(companyTemplate);
        ...
        $("#dialog").dialog();
        return this;
    },

there are no errors in the console, and nothing happens. I did reqire it in define() and include the appropriate css in my main page.

UPD autocomplete works fine, seems like it's related to dialog.

Try

<div id="dialog" title="Test">
    <p>Hello world!</p>
</div>

or

<div class="dialog" title="Test">
    <p>Hello world!</p>
</div>

$(".dialog").dialog();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM