JQuery Cxdialog dialog box

Source: Internet
Author: User

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
    1. $. cxdialog(' Hello world! ' );
Copymodal dialog box
  1. $.cxDialog({ 
  2.   title: ‘cxDialog‘, 
  3.   info: ‘欢迎使用 cxDialog 对话框!‘, 
  4.   lockScroll: true, 
  5.   background: ‘#000‘ 
  6. });
CopyLoading CSS files using methods
    1. <link rel="stylesheet" href="Jquery.cxdialog.css">
CopyLoading JavaScript files
    1. < Script src= "jquery.js" ></script>&NBSP;
    2. <script < Span class= "ATN" >src= "Jquery.cxdialog.js" Span class= "Html__tag_start" >></script
CopyCall Cxdialog
  1. $.cxDialog(‘内容‘); 
  2.  
  3. $.cxDialog(‘内容‘, function(){ 
  4.   // click ok callback 
  5. }, function(){ 
  6.   // click no callback 
  7. }); 
  8.  
  9. $.cxDialog({ 
  10.   title: ‘标题‘, 
  11.   info: ‘内容‘, 
  12.   ok: function(){ 
  13.     // code 
  14.   }, 
  15.   no: function(){} 
  16. });
CopySet global default values
    1. $. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.