Skip to content

Instantly share code, notes, and snippets.

View relipse's full-sized avatar

James Kinsman relipse

View GitHub Profile
/****************************************************************************
**
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Solutions component.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
@relipse
relipse / jquery.dlgConfirm.js
Last active December 13, 2015 20:18
a simple way to add a modal confirm box to your website
/**
* Open confirmation dialog (jqueryui modal)
*
* @requires jquery, jqueryui
* @param {string} c_text text/html to show in the dialog box
* @param {string|function(dlg_element)} c_title|confirm_callback title of the dialog box (or callback function)
* @param {string|function(dlg_element)} c_btn_text|confirm_callback confirm button text (or callback function)
* @param {string|function(dlg_element)} c_btn_cancel_text|confirm_callback cancel button text (defaults to 'Cancel') (or callback function)
* @param {function(dlg_element)} confirm_callback callback after the modal box is confirmed
*/