I'm trying to display a "dialog" with JQuery UI when i click on a button, but it isn't displaying. Is there a problem in my program?
Here is my code:
$(function() {
$("#mode").click(function() {
$("#dialog").dialog("open");
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button id="mode" type="button" class="btn-modalita link">change mode</button>
<div id="dialog" title="Empty the recycle bin?">
<p>
<span class="ui-icon ui-icon-alert" style="float:left; margin:12px 12px 20px 0;">
</span>you are changing mode. Are you sure?
</p>
</div>