Skip to content

weekaah/osmodal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OSModal is a plain javascript modal plugin.

Documentation

Documentation and demo can be found here: https://weekaah.github.io/osmodal/

Usage

<link rel="stylesheet" href="dist/css/osmodal.min.css">
<script src="dist/js/osmodal.min.js"></script>

<script>
  var myContent = document.getElementById('mymodal').innerHTML;

  document.getElementById('open').onclick = function() {
    osmodal({
      title: 'OSModal title',
      content: myContent,
      height: 480,
      width: 640
    }).open();
  };
</script>

Options and API

osmodal({
  title: '',
  content: '',

  closeButtonLabel: 'Close modal',
  expandButtonLabel: 'Expand modal',
  restoreButtonLabel: 'Restore modal',
  minimizeButtonLabel: 'Minimize modal',

  draggable: true,
  resizable: true,

  height: 480,
  minHeight: 280,
  width: 640,
  minWidth: 280
}).open();

License

© 2017 Viktor Lesic
Released under the MIT LICENSE

About

javascript modal plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published