This example shows how to open and close a modal dialog with JavaScript. The modal stays hidden until you activate it using the trigger button.