UNPKG

metro4

Version:

The front-end framework for Build responsive, mobile-first projects on the web with the first front-end component library in Metro Style

44 lines (38 loc) 1.09 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <link href="../metro/css/metro-all.css?ver=@@b-version" rel="stylesheet"> <title>Test Toast - Metro 4 :: Popular HTML, CSS and JS library</title> </head> <body class="m4-cloak"> <div class="container"> <h1>Toast test page</h1> <div> <button class="button" onclick="oldCall()">Toast old</button> <button class="button" onclick="newCall()">Toast new</button> </div> </div> <script src="../metro/js/metro.js?ver=@@b-version"></script> <script> function cb(){ alert("This is callback"); } function oldCall(){ Metro.createToast("Toast message", cb, null, "info"); } function newCall(){ Metro.createToast("Toast message", { clsToast: "alert", callback: cb }); } $(function(){ Metro.createToast("Toast message", { clsToast: "alert" }); }) </script> </body> </html>