Show Toaster message Simple example in HTML

 <!DOCTYPE html>

<html>

  <head>

    <title>Toastr Example</title>

    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/2.1.4/toastr.min.css" />

    <script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/2.1.4/toastr.min.js"></script>

  </head>

  <body>

    <button id="showToastButton">Show Toast</button>

     <button id="showSuccessButton">Show Success</button>


    <script>

      $(document).ready(function() {

        $("#showToastButton").click(function() {

          toastr.error("This is an error toast message.");

        });

          $("#showSuccessButton").click(function() {

          toastr.success("This is an error toast message.");

        });

      });

    </script>

  </body>

</html>

Comments

Popular posts from this blog

₹2.5 Lakh ki Alkaline Machine: Investment Ya Hype?" Japan Technology Wale Alkaline Water Systems: Science Ya Sirf Marketing? "Alkaline Water Machines — Health Ke Naam Par Business?

How to Write "M Squared" (M²) in C#