FAQs about jBox 2.3 jquery-based latest multi-function dialog box plug-ins

Source: Internet
Author: User
Tags i18n

Plugin description
-JBox is a jQuery-based multi-function dialog box plug-in that can achieve the overall style of the website and give users a new visual experience.
Running Environment
-Compatible with mainstream browsers such as IE6 +, Firefox, Chrome, Safari, and Opera.
Authorization
-JBox is permanently free to use, but relevant copyright information must be kept. If you have good suggestions, you can leave a message below.


Version: 2.3
Size: 19.8 k
Download: Click to download
Online demo: http://www.kudystudio.com/jbox/jbox-demo.html
[] JBox v2.3 beta version updated
Copy codeThe Code is as follows:
-[New] The opacity option is added to the tip method, which determines whether to display the isolation layer.
-The showScrolling option is added to [new] To hide the browser's scroll bar when displaying the jBox window.
-[New] When multiple Windows coexist, When you click a window title, the window is automatically at the top level.
-[Adjust] The id Option is changed to null by default. If it is null, a random id is automatically generated, and only one jBox is displayed for an id.
-[Adjust] The loaded option adds the parameter h, which indicates the jQuery object of the window content, so that you can initialize the content after loading the window.
-[Adjust] Put the global settings in a separate js file, unified in the directory i18n, currently only jquery. jBox-zh-CN.js.
-[Adjust] Press the Space key to directly execute the event submitted by the default button (to retain this function, it is not very nice when the button is focused, but the user experience should be prioritized ).
-[Fixed] the Bug that cannot be displayed during Multi-Window switching in IE.

Usage:
Copy codeThe Code is as follows:
<Script type = "text/javascript" src = "jBox/jquery-1.4.2.min.js"> </script>
<Script type = "text/javascript" src = "jBox/jquery. jBox-2.3.min.js"> </script>
<Script type = "text/javascript" src = "jBox/i18n/jquery. jBox-zh-CN.js"> </script>
<Link type = "text/css" rel = "stylesheet" href = "jBox/Skins/skin Folder/jbox.css"/>
// Or
<Link type = "text/css" rel = "stylesheet" href = "jBox/Skins2/skin Folder/jbox.css"/>

FAQs:
1. Use the XHTML 1.0 Standard
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2. Do not want to display the title?
Set the title to null, for example, jBox ('content', {title: null });
3. Do not want a button? Custom button?
Setting buttons to {} indicates that no button is displayed, for example, jBox ('content', {buttons :{}});
Custom button: jBox ('content', {buttons: {'button 1': 'button 1 click return value ', 'button 2 ': 'button 2 click return value '}});
You can also set the button for buttonsFocus as the default button. The index starts from 0.
4. Do not display the isolation layer?
Set opacity to 0, for example, jBox ('content', {opacity: 0 });
5. Is the window automatically closed?
Set timeout to 0 to disable automatically. A positive value indicates the number of milliseconds after which it is automatically disabled. For example, disable jBox ('content', {timeout: 3000}) after 3 seconds });
6. If the isolation layer is not displayed, do you want to prevent multiple identical windows from being displayed by clicking the button?
Pass the id in, because an id only displays one window, for example, jBox ('content', {id: 'My-id '});
7. Do you need to specify a value for the window height and width? Can it be adaptive?
Besides iframe, in other cases, the height and width of the window can be specified to be adaptive. For example: jBox ('content', {width: 'auto', height: 'auto '});
There are a lot of optional parameters for jbox, combined with different parameters can have different effects, please see the following global parameter description (in the file jquery. jBox-zh-CN.js ). If you are using simplified Chinese and do not want to modify the global configuration, you do not need to load jquery. jBox-zh-CN.js, because jquery. default settings in the jBox-2.3.min.js and jquery. jBox-zh-CN.js is the same, if you just want to modify a few options, such as window border, just a line of code can: jBox. setDefaults ({defaults: {border: 8 }});
If you like jBox, don't forget to click [recommended] Oh, 3q
Copy codeThe Code is as follows:
/* JBox global settings */
Var jBoxConfig = {};
JBoxConfig. defaults = {
Id: null,/* unique id in the page. If it is null, a random id is automatically generated. One id only displays one jBox */
Top: '200',/* The distance from the window to the top, which can be a percentage or pixel (for example, '100px ')*/
Border: 5,/* The pixel size of the window's outer border, must be an integer greater than 0 */
Opacity: 0.1,/* Transparency of the window isolation layer. If it is set to 0, no isolation layer is displayed */
Timeout: 0,/* the window is automatically closed after how many milliseconds are displayed. If it is set to 0, it is not automatically closed */
ShowType: 'fade ',/* type displayed in the window. Optional values: show, fade, and slide */
ShowSpeed: 'quick',/* display speed of the window. Optional values: 'low', 'quick', and an integer in milliseconds */
ShowIcon: true,/* Whether to display the icon of the window title, true, false, or custom CSS style class name (for the icon as the background )*/
ShowClose: true,/* Whether to display the close button in the upper-right corner of the window */
Draggable: true,/* Whether to drag the window */
DragLimit: true,/* whether to restrict the display range when the window can be dragged */
DragClone: false,/* Whether to clone the window when the mouse is pressed when the window can be dragged */
Persistent: true,/* If the isolation layer is displayed, do you want to stick to the window not close when you click the isolation layer */
ShowScrolling: true,/* Whether to display the browser scroll bar */
AjaxData :{},/* ajax post data when the window content is identified by get: or post: prefix, for example: {id: 1} or "id = 1 "*/
IframeScrolling: 'auto',/* the scrolling attribute value of iframe when the window content is identified by iframe: prefix. Optional values include: 'auto', 'yes', and 'no '*/
Title: 'jbox',/* title of the window */
Width: 350,/* The window width. The value is 'auto' or an integer representing a pixel */
Height: 'auto',/* the height of the window. The value is 'auto' or an integer that represents a pixel */
BottomText: '',/* content on the left of the button in the window. This setting is invalid when no button exists */
Buttons: {'confirmed': 'OK'},/* window button */
ButtonsFocus: 0,/* indicates which buttons are the default buttons, and the index starts from 0 */
Loaded: function (h) {},/* The function executed after the window is loaded. Note that, if ajax or iframe is used, the window is loaded only after the http request is loaded, parameter h indicates the jQuery object of the window content */
Submit: function (v, h, f) {return true ;},/* The callback function after the window button is clicked. If true is returned, the window is closed. There are three parameters, v indicates the return value of the clicked button, h indicates the jQuery object of the window content, and f indicates the form key value in the window content */
Closed: function () {}/* function executed after the window is closed */
};
JBoxConfig. stateDefaults = {
Content: '',/* Status content, does not support prefix identification */
Buttons: {'confirmed': 'OK'},/* Status button */
ButtonsFocus: 0,/* indicates which buttons are the default buttons, and the index starts from 0 */
Submit: function (v, h, f) {return true;}/* callback function after the status button is clicked. If true is returned, the window is closed. There are three parameters, v indicates the return value of the clicked button, h indicates the jQuery object of the window content, and f indicates the form key value in the window content */
};
JBoxConfig. tipDefaults = {
Content: '',/* content prompted. prefix identification is not supported */
Icon: 'info',/* indicates the icon. Optional values include 'info', 'success', 'warning', 'error', and 'loading ', the default value is 'info'. When it is 'loading', the timeout value is set to 0, indicating that it will not be automatically disabled. */
Top: '200',/* indicates the distance from the top, which can be a percentage or pixel (for example, '100px ')*/
Width: 'auto',/* indicates the height. The value is 'auto' or an integer representing a pixel */
Height: 'auto',/* indicates the height. The value is 'auto' or an integer representing a pixel */
Opacity: 0,/* Transparency of the window isolation layer. If it is set to 0, no isolation layer is displayed */
Timeout: 3000,/* indicates the number of milliseconds that will be automatically disabled. The value must be an integer greater than 0 */
Loaded: function (h) {}/* The function executed after the window is loaded. Parameter h indicates the jQuery object of the window content */
};
JBoxConfig. messagerDefaults = {
Content: '',/* content. prefix ID is not supported */
Title: 'jbox',/* Information title */
Icon: 'none',/* information icon. If the value is 'none', the icon is not displayed, optional values include 'none', 'info', 'Question ', 'success', 'warning', and 'error '*/
Width: 350,/* the height of the information. The value is 'auto' or an integer representing a pixel */
Height: 'auto',/* the height of the information. The value is 'auto' or an integer that represents a pixel */
Timeout: 3000,/* indicates how many milliseconds the information will be automatically disabled. If it is set to 0, it will not be automatically disabled */
ShowType: 'slide',/* type of information display. Optional values: show, fade, and slide */
ShowSpeed: 600,/* display speed of information. Optional values: 'low', 'quick', and an integer in milliseconds */
Border: 0,/* indicates the pixel size of the outer border. It must be an integer greater than 0 */
Buttons :{},/* Information Button */
ButtonsFocus: 0,/* indicates which buttons are the default buttons, and the index starts from 0 */
Loaded: function () {},/* function executed after the window is loaded */
Submit: function (v, h, f) {return true ;},/* callback function after the information button is clicked. If true is returned, the window is closed. There are three parameters, v indicates the return value of the clicked button, h indicates the jQuery object of the window content, and f indicates the form key value in the window content */
Loaded: function (h) {}/* The function executed after the window is loaded. Parameter h indicates the jQuery object of the window content */
};
JBoxConfig. languageDefaults = {
Close: 'close',/* indicates the close button in the upper-right corner of the window */
OK: 'OK',/* $. jBox. prompt () series of "OK" button text */
Yes: 'yes',/* $. jBox. warning () method's "yes" button text */
No: 'no',/* $. jBox. warning () method's "no" button text */
Cancel: 'cancel'/* $. jBox. confirm () and '$. jBox. warning ()' button text */
};
$. JBox. setDefaults (jBoxConfig );

Related Article

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.