boot4alert

1.0.1 • Public • Published

boot4alert

boot4alert.js Easy & Light weight Javascripts library allow you to create alert or confirm message with Bootstrap 4 modals :)

Getting Started

Dependencies

Example

  • Alert message
<script>
boot4.alert("Hello World!", "OK");
</script>
  • Alert message with callback function
 <script>
  boot4.alert(
    {
      msg: "Call Back",
      title: "Test Callback",
      callback: function() {
        console.log("callback");
      }
    },"OK");
  </script>
  • Custom Background-color Header Alert message
   <script>
   boot4.alert(
    {
      msg: "Custom Title",
      title: "Test",
      style: {
        "background-color": "#6200ea",
        color: "white",
        "font-weight": "bold"
      }
    },
    "OK"
  );
  </script>
  • Confirm message
<script>
 boot4.confirm({
    msg: "Confirm",
    title: "Test Confirm",
    callback: function(result) {
      if(result){
        console.log("ok");
      }
      else{
        console.log("cancel");
      }
    }
  });
</script>

Donate

Please donate to encourage and support ^ ^ Paypal : http://bit.ly/2FCa13E

Readme

Keywords

Package Sidebar

Install

npm i boot4alert

Weekly Downloads

3

Version

1.0.1

License

MIT

Unpacked Size

9.55 kB

Total Files

6

Last publish

Collaborators

  • fixxy