Brief Introduction
Xcheck is a jquery plug-in for checkbox selection/selection, which allows you to save selected items in multiple-page scenarios. How to use reference jquery.js to refer to Xcheck.js properties and Methods
Property:
Property name |
Type |
Default value |
Description |
Iskeep |
Boolean |
False |
is a "Keep selection" scenario (e.g., Ajax paging multiple selections) |
Groupclass |
String |
". Xcheckgroup" |
Class for group |
Checkitemclass |
String |
". Checkitem" |
Class for each item to select |
Checkallclass |
String |
". Checkall" |
"All selected" class |
Checkallcurrentclass |
String |
". Checkallcurrent" |
All select as Page class |
Clearcheckclass |
String |
". Clearcheck" |
Class with "Empty all selections" |
Clearcheckcurrentclass |
String |
". Clearcheckcurrent" |
Class for "Clear empty page selection" |
Reversecheckcurrentclass |
String |
". Reversecheckcurrent" |
Class for "Anti-select as page" |
Valueclass |
String |
". Xcheckvalue" |
Class that holds selected values |
Valueattr |
String |
"Value" |
Properties with selected values |
Event:
Beforecheckall |
function |
function () {} |
The callback function before all is selected, and if False, the default all all event is not performed |
Aftercheckall |
function |
function () {} |
callback function after "All selected All" |
Beforecheckallcurrent |
function |
function () {} |
callback function before select all as page, if False, does not perform the default all-selected page event |
Aftercheckallcurrent |
function |
function () {} |
callback function after "Select all as page" |
Beforecheckitem |
function |
function () {} |
The callback function before "select specific", if False, the default "select specific" event is not executed |
Aftercheckitem |
function |
function () {} |
callback function after "Select a specific item" |
Beforeclearcheck |
function |
function () {} |
callback function before "empty Select All", and if False, the default purge Select all event is not performed |
Afterclearcheck |
function |
function () {} |
callback function after "empty Select All" |
Beforeclearcheckcurrent |
function |
function () {} |
callback function before "empty select Current Page", if False, does not perform the default "empty Select Current Page" event |
Afterclearcheckcurrent |
function |
function () {} |
callback function after "empty select Current Page" |
Beforereversecheckcurrent |
function |
function () {} |
callback function before "anti-select as page", if False, does not perform default "anti-select as page" event |
Afterreversecheckcurrent |
function |
function () {} |
callback function after "anti-select as page" |
Exposing methods
Name |
Description |
$. Xcheck ({...}). Val (...) |
Gets or sets the result value |
$. Xcheck ({...}). Initval (...) |
Initializes the plug-in state based on the specified result value |
Selectedbaseinfo Object that holds the result when iskeep==true:
Property name |
Type |
Default value |
Description |
Ischeckall |
Boolean |
False |
Do you want to keep all the selected states? |
Selectedvalues |
Array |
[] |
The value of the selected item |
Unselectedvalues |
Array |
[] |
Value of an item not selected |
If you click "Select All", each page is selected by default if you click "All Options", if you uncheck some of the options, the current state is still selected, except that items that are not selected at this time are saved if you do not select all, the values for each option are saved in the option
Demo
Http://htmlpreview.github.io/?https://raw.githubusercontent.com/xucongli1989/XCheck/master/XCheck/demo.html
Note: Online preview may not be accurate, please refer to the source xcheck/demo.html preview Map
Download Address: https://github.com/xucongli1989/XCheck/releases
Project Address: Https://github.com/xucongli1989/XCheck