HTMLGuyLLC / jAlert

jQuery alert/modal/lightbox plugin
https://htmlguyllc.github.io/jAlert/
MIT License
76 stars 35 forks source link

Easy way to customize confirmation question #42

Closed rafacompu closed 5 years ago

rafacompu commented 7 years ago

ToDo: ~ Create a function to easily customize the confirmation question

HTMLGuyLLC commented 7 years ago

confirm(onconfirm, ondeny, confirmation_question, confirm_btn_text, deny_btn_text) Just adding parameters to the confirm method should satisfy this.

Yokomoko commented 5 years ago

I don't think this works at all. Tried using confirm() and $jAlert with the confirmQuestion parameter, doesn't work, it always keeps 'Are you sure?'.

HTMLGuyLLC commented 5 years ago

Well, this issue is still open because I never added the question to the confirm method. That was just an example of how it could be modified to satisfy his request.

Using $.jAlert({ type: "confirm", confirmQuestion: "Whatever" }); does work.

HTMLGuyLLC commented 5 years ago

FYI, I recommend you use my jConfirm plugin. It pops up a tooltip right by the trigger element. Much faster for someone to use. https://github.com/HTMLGuyLLC/jConfirm

HTMLGuyLLC commented 5 years ago

Added confirm question as the third param for the confirm method in the latest release.

example:

confirm(function(){ alert('Confirmed'); }, function(){ alert('Not Confirmed'); }, 'What's up doc?');