Skip to content
This repository was archived by the owner on Aug 23, 2025. It is now read-only.

Xerdi/Material-Design-Modal-Dialog-Builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Material-Design-Modal-Dialog-Builder

Create dialogs in a nutshell

Dependencies

Bootstrap material design

Put this in your <head>

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<link href="material/css/ripples.min.css" rel="stylesheet">
<link href="material/css/material-wfont.min.css" rel="stylesheet">

Put this at the bottom of your <body>

<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

<script src="material/js/ripples.min.js"></script>
<script src="material/js/material.min.js"></script>

<script src="js/modal.js"></script>

Usage

How to hook a dialog

var modal = new Modal({
  title: "A modal example!",
  body: document.createTextNode("This is an example of an HTML DOM element added to the body of the modal."),
  success: "success button text",
  process: function () {
    //some ajax functions
    modal.close();
  }
});

$('#my-button').click(function() {
  modal.show();
});

About

Create dialogs in a nutshell

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published