jQuery-Plugin-For-Lightbox

所属分类:JavaScript/JQuery
开发工具:JavaScript
文件大小:233KB
下载次数:1
上传日期:2016-04-28 10:22:14
上 传 者3624626
说明:  利用HTML5,CSS3,JavaScript写的很酷的提示框。
(Using HTML5, CSS3, JavaScript writes a cool tip box .)

文件列表:
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\bower.json (1055, 2014-01-03)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\confirmon.jquery.json (1068, 2014-01-03)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\doc\screenshot_1.png (2907, 2014-01-03)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\doc\screenshot_2.png (14445, 2014-01-03)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\doc (0, 2015-08-06)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jquery.confirmon.css (1200, 2014-01-03)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jquery.confirmon.js (7427, 2014-01-03)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jquery.confirmon.min.js (3281, 2014-01-03)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\lib\jquery-1.7.0.js (249158, 2014-01-03)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\lib (0, 2015-08-06)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\LICENSE.txt (1083, 2014-01-03)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\sample\index.html (3698, 2014-01-03)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\sample\sample.css (2009, 2014-01-03)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\sample (0, 2015-08-06)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\test\index.html (703, 2014-01-03)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\test\qunit\qunit.css (4671, 2014-01-03)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\test\qunit\qunit.js (58757, 2014-01-03)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\test\qunit (0, 2015-08-06)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\test\tests.js (24468, 2014-01-03)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\test (0, 2015-08-06)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn (0, 2015-08-06)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn\jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn.zip (124447, 2014-01-12)
jQuery-Plugin-For-Lightbox-Style-Confirm-Interface-confirmOn (0, 2015-08-06)

jQuery-confirmOn ================= A jQuery plugin for adding an easy 'are you sure' confirmation pop-up before the handler in .on() is called. ##Changelog * [v0.1.3](https://github.com/invetek/jquery-confirmon/tree/0.1.3) - The 'No' button is now standard focused, the tab key works as expected and the esc key closes the pop-up * [v0.1.2](https://github.com/invetek/jquery-confirmon/tree/0.1.2) - ClassPrepend option is now also used for the inner elements of the pop-up * [v0.1.1](https://github.com/invetek/jquery-confirmon/tree/0.1.1) - Added a handler for answer 'no' * [v0.1.0](https://github.com/invetek/jquery-confirmon/tree/0.1.0) - Initial release ##What does this plugin? The confirmOn plugin shows a confirmation box when the provided events are triggered. It works exactly like jQuery's .on() but with a confirmation step between the event and the handler. When the user answers the confirmation dialog, the handler is called with the answer as a parameter, so you can decide what to do next. The user can press the escape key which closes the dialog and doesn't call the yes or no handlers. ![Example of confirmation box](/doc/screenshot_2.png) ##Installing Grab jquery.confirmon.js from the repository and insert the following line _after_ the jQuery script in your code: ```html ``` That's all. Maybe you want to use the stylesheet that creates a screenwide overlay and a centered box. No problem, just add jquery.confirmon.css to your html. ```html ``` Since there are only a few classes involved you can insert the classes into your existing stylesheet for performance sake. ##Usage Use .confirmOn() the same way as you use jQuery's .on(). Check http://api.jquery.com/on/ for the documentation. There are some options that can be set to customize the plugin. Add them as the first argument of .confirmOn(). ```javascript { questionText: 'Are you sure?', // The confirmation question classPrepend: 'confirmon', // Use another prefix for the classes used by the plugin textYes: 'Yes', // Text on the button the user clicks when the handler should be called textNo: 'No' // Text on the button the user clicks when the handler should not be called } ``` ##Example ```javascript $('#myButton').confirmOn('click', function(e, confirmed){ if(confirmed) deleteSomethingImportant(); else { //If we need to, we can do some actions here if the user cancelled the confirmation } }) ``` When #myButton is clicked, this confirmation box pops up:
![Screenshot of a confirmation box](/doc/screenshot_1.png) Check out this [live](http://www.invetek.nl/samples/confirmon/index.html) sample (and its [source](sample)). ##Maintainers People who've contributed: * [Dag Jomar Mersland | MazeMap](https://github.com/dagjomar) * [Maxime Thirouin | MoOx] (https://github.com/MoOx)

近期下载者

相关文件


收藏者