Buy now!

NinjaModal

Sample 02. Confirmation with custom buttons

Confirmation Sample

HTML

                        

Confirmation Sample

JS

                        function showModal() {
                            ninjaModal({
                                css:"nc-modal-small",
                                title: 'Confirmation Modal',
                                html: 'This is a confirmation modal! Do you like it?',
                                buttons: [
                                    {
                                        text: 'Yes',
                                        callback: function (modal) {
                                            alert('you clicked YES');
                                            modal.close(); //-- close the current modal
                                        }
                                    },
                                    {
                                        text: 'No',
                                        callback: function (modal) {
                                            alert('you clicked NO');
                                            modal.close(); //-- close the current modal
                                        }
                                    }
                                ]
                            });
                            return false;
                        }