Materialize Toasts
home
Run
screen_rotation
fullscreen
cloud_download
navigate_before
navigate_next
<!DOCTYPE html> <html> <head> <link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/css/materialize.min.css"> <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/js/materialize.min.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> </head> <body> <script> function myToast(){ var $toastContent = $('<div style="background:yellow;color:red;">Toast With Custom Content</div>'); Materialize.toast($toastContent, 5000); } </script> <a class="btn" onclick="myToast()">Custom Html Toast</a> </body> </html>
<!DOCTYPE html> <html> <head> <link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/css/materialize.min.css"> <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/js/materialize.min.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> </head> <body> <script> function myToast(){ var $toastContent = $('<div style="background:yellow;color:red;">Toast With Custom Content</div>'); Materialize.toast($toastContent, 5000); } </script> <a class="btn" onclick="myToast()">Custom Html Toast</a> </body> </html>
Copyrights@tutorialsplane.com