{"id":23156535,"url":"https://github.com/thecreation/jquery-ascheck","last_synced_at":"2025-12-12T03:43:25.766Z","repository":{"id":57281981,"uuid":"9336314","full_name":"thecreation/jquery-asCheck","owner":"thecreation","description":"a easy used and customized checkbox","archived":false,"fork":false,"pushed_at":"2017-09-19T12:01:07.000Z","size":2274,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-25T13:53:46.458Z","etag":null,"topics":["checkbox","form-input","jquery-plugin","radio"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thecreation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-10T02:24:53.000Z","updated_at":"2019-03-16T09:59:04.000Z","dependencies_parsed_at":"2022-08-24T12:41:24.315Z","dependency_job_id":null,"html_url":"https://github.com/thecreation/jquery-asCheck","commit_stats":null,"previous_names":["amazingsurge/jquery-ascheck"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/thecreation/jquery-asCheck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreation%2Fjquery-asCheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreation%2Fjquery-asCheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreation%2Fjquery-asCheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreation%2Fjquery-asCheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecreation","download_url":"https://codeload.github.com/thecreation/jquery-asCheck/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreation%2Fjquery-asCheck/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267029422,"owners_count":24024202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["checkbox","form-input","jquery-plugin","radio"],"created_at":"2024-12-17T21:13:54.936Z","updated_at":"2025-12-12T03:43:25.706Z","avatar_url":"https://github.com/thecreation.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [jQuery asCheck](https://github.com/amazingSurge/jquery-asCheck) ![bower][bower-image] [![NPM version][npm-image]][npm-url] [![Dependency Status][daviddm-image]][daviddm-url] [![prs-welcome]](#contributing)\n\n\u003e A jquery plugin that do amazing things.\n\n## Table of contents\n- [Main files](#main-files)\n- [Quick start](#quick-start)\n- [Requirements](#requirements)\n- [Usage](#usage)\n- [Examples](#examples)\n- [Options](#options)\n- [Methods](#methods)\n- [Events](#events)\n- [No conflict](#no-conflict)\n- [Browser support](#browser-support)\n- [Contributing](#contributing)\n- [Development](#development)\n- [Changelog](#changelog)\n- [Copyright and license](#copyright-and-license)\n\n## Main files\n```\ndist/\n├── jquery-asCheck.js\n├── jquery-asCheck.es.js\n├── jquery-asCheck.min.js\n└── css/\n    ├── asCheck.css\n    └── asCheck.min.css\n```\n\n## Quick start\nSeveral quick start options are available:\n#### Download the latest build\n\n * [Development](https://raw.githubusercontent.com/amazingSurge/jquery-asCheck/master/dist/jquery-asCheck.js) - unminified\n * [Production](https://raw.githubusercontent.com/amazingSurge/jquery-asCheck/master/dist/jquery-asCheck.min.js) - minified\n\n#### Install From Bower\n```sh\nbower install jquery-asCheck --save\n```\n\n#### Install From Npm\n```sh\nnpm install jquery-asCheck --save\n```\n\n#### Install From Yarn\n```sh\nyarn add jquery-asCheck\n```\n\n#### Build From Source\nIf you want build from source:\n\n```sh\ngit clone git@github.com:amazingSurge/jquery-asCheck.git\ncd jquery-asCheck\nnpm install\nnpm install -g gulp-cli babel-cli\ngulp build\n```\n\nDone!\n\n## Requirements\n`jquery-asCheck` requires the latest version of [`jQuery`](https://jquery.com/download/).\n\n## Usage\n#### Including files:\n\n```html\n\u003clink rel=\"stylesheet\" href=\"/path/to/asCheck.css\"\u003e\n\u003cscript src=\"/path/to/jquery.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"/path/to/jquery-asCheck.js\"\u003e\u003c/script\u003e\n```\n\n#### Required HTML structure\n\n```html\n\u003cinput class=\"example\" type=\"radio\" name=\"radio\" id=\"radio-example\" value=\"male\" /\u003e\u003clabel for=\"radio-example\"\u003eExample\u003c/label\u003e\n```\n\n#### Initialization\nAll you need to do is call the plugin on the element:\n\n```javascript\njQuery(function($) {\n  $('.example').asCheck(); \n});\n```\n\n## Examples\nThere are some example usages that you can look at to get started. They can be found in the\n[examples folder](https://github.com/amazingSurge/jquery-asCheck/tree/master/examples).\n\n## Options\n`jquery-asCheck` can accept an options object to alter the way it behaves. You can see the default options by call `$.asCheck.setDefaults()`. The structure of an options object is as follows:\n\n```\n{\n  namespace: 'asCheck',\n  skin: null,\n\n  disabled: false\n}\n```\n\n## Methods\nMethods are called on asCheck instances through the asCheck method itself.\nYou can also save the instances to variable for further use.\n\n```javascript\n// call directly\n$().asCheck('destroy');\n\n// or\nvar api = $().data('asCheck');\napi.destroy();\n```\n\n#### enable()\nEnable the check functions.\n```javascript\n$().asCheck('enable');\n```\n\n#### disable()\nDisable the check functions.\n```javascript\n$().asCheck('disable');\n```\n\n#### destroy()\nDestroy the check instance.\n```javascript\n$().asCheck('destroy');\n```\n\n## Events\n`jquery-asCheck` provides custom events for the plugin’s unique actions. \n\n```javascript\n$('.the-element').on('asCheck::ready', function (e) {\n  // on instance ready\n});\n\n```\n\nEvent   | Description\n------- | -----------\ninit    | Fires when the instance is setup for the first time.\nready   | Fires when the instance is ready for API use.\nenable  | Fired when the `enable` instance method has been called.\ndisable | Fired when the `disable` instance method has been called.\ndestroy | Fires when an instance is destroyed. \n\n## No conflict\nIf you have to use other plugin with the same namespace, just call the `$.asCheck.noConflict` method to revert to it.\n\n```html\n\u003cscript src=\"other-plugin.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"jquery-asCheck.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  $.asCheck.noConflict();\n  // Code that uses other plugin's \"$().asCheck\" can follow here.\n\u003c/script\u003e\n```\n\n## Browser support\n\nTested on all major browsers.\n\n| \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/safari/safari_32x32.png\" alt=\"Safari\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/chrome/chrome_32x32.png\" alt=\"Chrome\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/firefox/firefox_32x32.png\" alt=\"Firefox\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/edge/edge_32x32.png\" alt=\"Edge\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/internet-explorer/internet-explorer_32x32.png\" alt=\"IE\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/opera/opera_32x32.png\" alt=\"Opera\"\u003e |\n|:--:|:--:|:--:|:--:|:--:|:--:|\n| Latest ✓ | Latest ✓ | Latest ✓ | Latest ✓ | 9-11 ✓ | Latest ✓ |\n\nAs a jQuery plugin, you also need to see the [jQuery Browser Support](http://jquery.com/browser-support/).\n\n## Contributing\nAnyone and everyone is welcome to contribute. Please take a moment to\nreview the [guidelines for contributing](CONTRIBUTING.md). Make sure you're using the latest version of `jquery-asCheck` before submitting an issue. There are several ways to help out:\n\n* [Bug reports](CONTRIBUTING.md#bug-reports)\n* [Feature requests](CONTRIBUTING.md#feature-requests)\n* [Pull requests](CONTRIBUTING.md#pull-requests)\n* Write test cases for open bug issues\n* Contribute to the documentation\n\n## Development\n`jquery-asCheck` is built modularly and uses Gulp as a build system to build its distributable files. To install the necessary dependencies for the build system, please run:\n\n```sh\nnpm install -g gulp\nnpm install -g babel-cli\nnpm install\n```\n\nThen you can generate new distributable files from the sources, using:\n```\ngulp build\n```\n\nMore gulp tasks can be found [here](CONTRIBUTING.md#available-tasks).\n\n## Changelog\nTo see the list of recent changes, see [Releases section](https://github.com/amazingSurge/jquery-asCheck/releases).\n\n## Copyright and license\nCopyright (C) 2016 amazingSurge.\n\nLicensed under [the LGPL license](LICENSE).\n\n[⬆ back to top](#table-of-contents)\n\n[bower-image]: https://img.shields.io/bower/v/jquery-asCheck.svg?style=flat\n[bower-link]: https://david-dm.org/amazingSurge/jquery-asCheck/dev-status.svg\n[npm-image]: https://badge.fury.io/js/jquery-asCheck.svg?style=flat\n[npm-url]: https://npmjs.org/package/jquery-asCheck\n[license]: https://img.shields.io/npm/l/jquery-asCheck.svg?style=flat\n[prs-welcome]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg\n[daviddm-image]: https://david-dm.org/amazingSurge/jquery-asCheck.svg?style=flat\n[daviddm-url]: https://david-dm.org/amazingSurge/jquery-asCheck\n\n\n\n\n\n\n#jquery-asCheck\n\nThe powerful jQuery plugin that provide a easy used and customized checkbox. \u003ca href=\"http://amazingSurge.github.io/jquery-asCheck/\"\u003eProject page and demos\u003c/a\u003e\u003cbr /\u003e\nDownload: \u003ca href=\"https://github.com/amazingSurge/jquery-asCheck/archive/master.zip\"\u003ejquery-asCheck-master.zip\u003c/a\u003e\n\n***\n\n## Features\n\n* **callbacks to handle changes** \n* **Lightweight size** — 1 kb gzipped\n* **Saves changes to textarea, works carefully with any selectors** \n\n## Dependencies\n\n* \u003ca href=\"http://jquery.com/\" target=\"_blank\"\u003ejQuery 1.83+\u003c/a\u003e\n\n## Usage\n\nImport this libraries:\n* jQuery\n* jquery-asCheck.min.js\n\nAnd CSS:\n* jquery-asCheck.css - desirable if you have not yet connected one\n\n\nCreate base html element:\n```html\n\u003cul\u003e\n    \u003cli\u003e\n        \u003cinput class=\"radio\" type=\"radio\" name=\"radiobox\" id=\"male-1\" value=\"male\" /\u003e\n        \u003clabel for=\"male-1\" \u003eMale\u003c/label\u003e\n    \u003c/li\u003e\n     \u003cli\u003e\n        \u003cinput class=\"radio\" type=\"radio\" name=\"radiobox\" id=\"male-2\" value=\"female\" /\u003e\n        \u003clabel for=\"male-2\" \u003eFemale\u003c/label\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n        \u003cinput class=\"radio\" type=\"radio\" name=\"radiobox\" id=\"male-3\" value=\"male\" disabled=\"disabled\" /\u003e\n        \u003clabel for=\"male-3\" \u003echecked disable\u003c/label\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n        \u003cinput class=\"radio\" type=\"radio\" name=\"radiobox\" id=\"male-4\" value=\"male\" disabled=\"disabled\" /\u003e\n        \u003clabel for=\"male-4\" \u003echecked disable\u003c/label\u003e\n    \u003c/li\u003e\n\u003c/ul\u003e\n```\n\nInitialize check:\n```javascript\n$('.radio').check({skin: 'skin-1'});\n```\n\nOr initialize check with custom settings:\n```javascript\n$(\".radio\").check({\n         namespace: 'check',\n        skin: null,\n        state: 'enabled', \n        checked: 'checked', \n        type: 'checkbox',  // checkbox , radio\n        onChange: function() {}\n});\n```\n\n## Settings\n\n```javascript\n{\n    //Optional property, set a namspace for css class, for example, we \n    //have \u003ccode\u003e.check_active\u003c/code\u003e class for active effect, if\n    //namespace set to 'as-check', then it will be \u003ccode\u003e.as-check_active\n    namespace: 'check',\n\n    //Optional property, set transition effect, it works after you load specified skin file\n    skin: null,\n\n    //Optional property, set input's disabled state\n    state: enable,\n\n    //Optional property, set input's checked property,if the value is 'checked',this input will be checked\n    checked: 'checked',\n\n    //Optional property, set input's type\n    type: 'checkbox',\n\n    //callback after input's state is changed\n    Onchange: function(）{}\n}\n```\n\n## Public methods\n\njquery check has different methods , we can use it as below :\n```javascript\n// set input's state\n$(\".radio\").check(\"set\");\n\n// remove disabled state\n$(\".radio\").check(\"enable\");\n\n// change input's state to disabled\n$(\".radio\").check(\"disable\");\n```\n\n## Event / Callback\n\n* \u003ccode\u003echange\u003c/code\u003e: trigger when input's checked property changed\n* \u003ccode\u003edisabled\u003c/code\u003e: trigger when input set to disabled\n* \u003ccode\u003eenabled\u003c/code\u003e:  trigger when input set to enabled\n\nhow to use event:\n```javascript\n$(document).on('change', function(event,instance) {\n    // instance means current  check instance \n    // some stuff\n});\n``` \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecreation%2Fjquery-ascheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecreation%2Fjquery-ascheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecreation%2Fjquery-ascheck/lists"}