Tiny Nice Confirmation Popup Plugin With jQuery - H-confirm-alert

File Size: 6.36 KB
Views Total: 2824
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Tiny Nice Confirmation Popup Plugin With jQuery - H-confirm-alert

H-confirm-alert is a super light jQuery plugin used for creating a pretty nice and fully configurable popup window to replace the native browser confirm and alert dialog boxes.

How to use it:

1. Load the jQuery H-confirm-alert plugin and other required resources in the html page.

<script src="//code.jquery.com/jquery.min.js"></script>
<link rel="stylesheet" href="HPCF/H-confirm-alert.css">
<script src="HPCF/H-confirm-alert.js" ></script>

2. Create a basic alert popup on the screen.

$.confirm.show({
  "message": "Alert Message Here",
  "hideNo": true, // hide cancel button
})

3. Create a basic confirmation dialog popup with Yet/No callbacks on the screen.

$.confirm.show({
  "message": "Confirm Message Here",
  "yes": function (){
    // fired once you click on the confirm button
  },
  "no": function (){
    // fired once you click on the cancel button
  },
})

4. Show/hide confirm and/or cancel buttons as per your need.

$.confirm.show({
  "message": "Alert Message Here",
  "hideNo":false,
  "hideYes":false
})

5. Customize the text for the confirm and cancel buttons.

$.confirm.show({
  "message": "Alert Message Here",
  "yesText":"Confrim",
  "noText":"Cancel"
})

6. Change the title color of the confirm/alert dialog.

$.confirm.show({
  "message": "Alert Message Here",
  "type":"default" // or success, danger, warning
})

This awesome jQuery plugin is developed by GouTao. For more Advanced Usages, please check the demo page or visit the official website.