Created
December 22, 2017 14:19
-
-
Save rbhatia46/c375815774bf33022c672266198cef39 to your computer and use it in GitHub Desktop.
Example of Modal in Materialize CSS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css" /> | |
| <title>Document</title> | |
| </head> | |
| <body> | |
| <a class="waves-effect waves-light btn view" onclick="$('#modal1').modal('open');">Click Me</a> | |
| <!-- Modal Structure --> | |
| <div id="modal1" class="modal"> | |
| <div class="modal-content"> | |
| <h4>Modal Header</h4> | |
| <p>A bunch of text</p> | |
| </div> | |
| <div class="modal-footer"> | |
| <a href="#!" class=" modal-action modal-close waves-effect waves-green btn-flat">Agree</a> | |
| </div> | |
| </div> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script> | |
| <script> | |
| $(document).ready(function() { | |
| $('#modal1').modal(); | |
| }); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment