Skip to content
Very simple javascript library for opening modal views
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
demo
src
.gitattributes
.gitignore
Gruntfile.js
LICENSE
README.md
package-lock.json
package.json

README.md

ModalsJs

Loading the library creates the object ModalsJs which has a number of functions:

open(html, options) opens a modal view using the input html.

openImage(src, title, desc) opens a modal image view using the parameters.

close(ignoreWarning, modal) closes the topmost modal view. If ignoreWarning === true then warnings will be ignored. If a reference to an open modal is passed as second parameter, that specific modal will be closed.

closeAll() closes all modals and ignores warnings.

prompt(promptOptions, onAccept, onReject) opens a prompt using the title, accept and reject fields on the options-object to create a modal prompt. Callbacks are only invoked if user presses accept or reject button.

You can’t perform that action at this time.