Javascript modal quick reference

Considering the example below:

<html>
<script src="https://jsuites.net/v4/jsuites.js"></script>
<link rel="stylesheet" href="https://jsuites.net/v4/jsuites.css" type="text/css" />

<div id="modal"></div>

<script>
var myModal = jSuites.modal(document.getElementById('modal'));
</script>
</html>


Available Methods

Method Description
myModal.open()Open the modal
myModal.close()Close the modal


Initialiation properties

Property Description
url: stringOpen the content from a remote URL.
closed: booleanCreate the modal but keep it closed.
width: numberThe width size of your modal
height: numberThe height size of your modal
title: stringThe title shown of your modal
backdrop: booleanDon't show the backdrop


Events

Event Description
onopenA method is execute when the modal is opened.
(element: HTMLElement, instance: JSON) => void
oncloseA method is execute when the modal is closed.
(element: HTMLElement, instance: JSON) => void