Wijmo User Guide > Widgets > Dialog > Markup and Scripting |
The following markup can be used to create the HTML element that will become the widget as well as the dialog's content:
Sample Markup |
Copy Code
|
---|---|
<div> <input type="button" value="Hide Dialog" onclick="$('#dialog').wijdialog('close')" /> <input type="button" value="Show Dialog" onclick="$('#dialog').wijdialog('open')" /> <div id="dialog" title="Basic dialog"> </div> </div> |
The majority of the time, you'll want the wijdialog to show up during an event, such as an onClick event. For example, the above markup includes markup to create buttons that will show or hide the wijdialog widget.
The following script initializes the widget:
Sample Script |
Copy Code
|
---|---|
<script id="scriptInit" type="text/javascript"> $(document).ready(function () { $('#dialog').wijdialog({ autoOpen: false, captionButtons: { refresh: { visible: false} } }); }); </script> |
The markup and script featured here results in the following: