Skip to content

Vanilla JavaScript Google's MaterialDesign-like loading modal

License

Notifications You must be signed in to change notification settings

dogchef-be/material-loading

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

material-loading

Vanilla JavaScript Google's MaterialDesign-like loading modal

Installation

<!-- include material lite libs -->
<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.indigo-pink.min.css">
<script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/fechanique/material-loading/master/material-loading.css">
<script src="https://cdn.rawgit.com/fechanique/material-loading/master/material-loading.js"></script>

Functions

Open loading modal

materialLoading(true)

Close loading modal

materialLoading(false)

Example

<html>
  <head>
    <link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.indigo-pink.min.css">
    <script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>
    <link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/fechanique/material-loading/master/material-loading.css">
    <script src="https://cdn.rawgit.com/fechanique/material-loading/master/material-loading.js"></script>
  </head>
  <body>
    <button onclick="materialLoading(true);setTimeout(function(){materialLoading(false)},3000)">Open loading modal</button>
  </body>
</html>

About

Vanilla JavaScript Google's MaterialDesign-like loading modal

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 55.5%
  • CSS 44.5%