CheckBox Full Selection/anti-selection jquery plugin (support for multiple-page retention selection)

Source: Internet
Author: User
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

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.