Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added several practical methods #165

Open
wf58585858 opened this issue Jul 27, 2018 · 0 comments
Open

Added several practical methods #165

wf58585858 opened this issue Jul 27, 2018 · 0 comments

Comments

@wf58585858
Copy link

		Switchery.prototype.check = function () {
			this.setStatus(true);
		};

		Switchery.prototype.uncheck = function () {
			this.setStatus(false);
		};

		Switchery.prototype.toggleStatus = function () {
			this.setStatus(this.isChecked());
		};

		Switchery.prototype.setStatus = function (status) {
			this.element.checked = !!status;
			this.setPosition(true);
		};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant