Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

org.webjars.bower:bootstrap.checkbox

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

org.webjars.bower:bootstrap.checkbox

WebJar for bootstrap.checkbox

  • 1.0.0
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

bootstrap-checkbox

A checkbox component based on bootstrap framework

Author

Roberto Montresor

Documentation

You can find demo and documentation here.

Usage

Create your <input type="checkbox"> with the .checkbox class.

<input type="checkbox" class="checkbox" />
<input type="checkbox" class="checkbox" checked="checked"/>
<input type="checkbox" class="checkbox" disabled="disabled"/>
<input type="checkbox" class="checkbox" checked="checked" disabled="disabled"/>

Enable Bootstrap-checkbox via JavaScript:

$('.checkbox').checkbox();

Or just

$('input[type="checkbox"]').checkbox();

Options

Options can be passed via data attributes or JavaScript.

$('input[type="checkbox"]').checkbox({
  buttonStyle: 'btn-link',
  buttonStyleChecked: 'btn-inverse',
  checkedClass: 'fa fa-check',
  uncheckedClass: 'fa fa-square-o',
  defaultState: false,
  defaultEnabled: true,
  
  checked: false,
  enabled: true
});

You can append or prepend a label via the data-label or data-label-prepend attribute. You can set a default state (used when you reset a form) via the data-default-state attribute. You can set a default abilitation (used when you reset a form) via the data-default-enabled attribute.

Methods

$('input[type="checkbox"]').checkbox('click'); // change input's state
$('input[type="checkbox"]').checkbox('toggleEnabled'); // change input's enabled

Copyright (C) 2013 Roberto Montresor

Licensed under the MIT license.

FAQs

Package last updated on 06 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc