Cxdialog is a jQuery-based dialog plugin that supports custom skin styles and is compatible with Zepto for easy use on mobile.
- Version:
- JQuery v1.7+ | Zepto v1.0+
JQuery Cxdialog v1.2.2
GitHub Address
* Compatible with Zepto, requires data module support
Online example
Instance Preview Basic Example
Instance Preview Content Settings
Instance Preview Add button
Instance Preview appearance style
Instance Preview API Interface
Instance previews support AMD specifications
Instance Preview compatible Zepto
Default effect
- $. cxdialog(' Hello world! ' );
Copymodal dialog box
$.cxDialog({
title: ‘cxDialog‘,
info: ‘欢迎使用 cxDialog 对话框!‘,
lockScroll: true,
background: ‘#000‘
});
CopyLoading CSS files using methods
- <link rel="stylesheet" href="Jquery.cxdialog.css">
CopyLoading JavaScript files
< Script src= "jquery.js" ></script>&NBSP;
<script < Span class= "ATN" >src= "Jquery.cxdialog.js" Span class= "Html__tag_start" >></script
CopyCall Cxdialog
$.cxDialog(‘内容‘);
$.cxDialog(‘内容‘, function(){
// click ok callback
}, function(){
// click no callback
});
$.cxDialog({
title: ‘标题‘,
info: ‘内容‘,
ok: function(){
// code
},
no: function(){}
});
CopySet global default values
- $. cxdialog. Defaults. Title = ' hint ';
CopyParameter description
name |
Default Value |
Description |
Title |
‘‘ |
Title |
Info |
‘‘ |
Content. Can be set to text content, or DOM elements. |
Ok |
Null |
The callback function when you click Confirm |
Oktext |
Determine |
Confirm the text displayed by the button |
No |
Null |
The callback function when you click Cancel |
Notext |
Cancel |
Cancel the text displayed by the button |
Buttons |
[] |
Custom Buttons |
Closebtn |
True |
Whether to show the Close button |
Lockscroll |
False |
Whether to lock scrolling |
BaseClass |
‘‘ |
Adds class to the dialog box container without overwriting the default class. |
Background |
‘‘ |
The color of the matte background, left blank as a transparent matte. Can be set to: HEX, RGBA format color value, or CSS Background property support value. If masking background is not required, set to: false |
Width |
0 |
Tip Box Fixed width |
Height |
0 |
Tip Box Fixed Height |
ZIndex |
0 |
Level of the Cue box |
Buttons parameters
name |
Description |
Text |
The text that the button displays |
Callback |
callback function |
API interface
name |
Description |
$.cxdialog.close () |
Close the dialog box |
Download
JQuery Cxdialog dialog box