This time I will share jQuery Plugin and tutorial about Simple Flexible jQuery Dialog Popup Plugin – dialogBox, hope it will help you in programming stack.
Just another jQuery dialog box plugin which provides a simple way to display popup / modal windows with a plenty of options for animations and custom styles.
More features:
- Auto close after a timeout.
- 7 built-in animation types: fade,newspaper,fall,scaled,flip-horizontal,flip-vertical,sign
- Adaptive content for responsive web layout.
- Confirm / cancel callback functions.
- Optional fullscreen mask layers.
- Supports inline elements or external data sources.
- 3 types of dialog boxes: normal, confirm, error.
How to use it:
1. Include the jQuery dialogBox plugin’s stylesheet in the head section of the document.
1 |
< link rel = "stylesheet" href = "css/jquery.dialogbox.css" > |
2. Create a button input to trigger a dialog box.
1 |
< input type = "button" value = "click" id = "btnDialog" > |
3. Create an empty element for the dialog box.
1 |
< div id = "dialog" ></ div > |
4. Include the jQuery dialogBox plugin’s script after jQuery library.
1 |
< script src = "//code.jquery.com/jquery-1.11.2.min.js" ></ script > |
2 |
< script src = "js/jquery.dialogBox.js" ></ script > |
5. Display a basic dialog box as you click on the trigger button.
1 |
$( '#btnDialog' ).click( function (){ |
2 |
$( '#dialog' ).dialogBox({ |
6. Configuration options.
31 |
confirm: function (){}, |
54 |
callback: function (){}, |
Change logs:
2015-10-22
2015-07-17
- add a callback when close dialog
2015-06-19
- fix single text appear word wrap bug
2015-06-03
2015-05-20
2015-05-14
- add marginheight and marginwidth to iframe
2015-05-13
- add content resource DOM object and jQuery object description
- add callback.
2015-05-11
- improvement for ajax operation.
2015-05-06
- fix dialogBox margin-top size when it’s set auto size
2015-05-05
2015-05-04
- fix dialogBox can’t vertical center when it’s auto size
- fix dialogBox margin-top size when it’s setting auto size
2015-04-28
- Fixed: can not popup new dialogs.
- Fixed: auto height bug
This awesome jQuery plugin is developed by shenmiweiyi. For more Advanced Usages, please check the demo page or visit the official website.