Coder Social home page Coder Social logo

alptekinenes / simple-button-checks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joelthorner/simple-button-checks

0.0 1.0 0.0 487 KB

Simple button checks is a simple plugin for transform checkbox inputs into html buttons for css customize.

Home Page: http://joelthorner.github.io/simple-button-checks/

License: Other

HTML 100.00%

simple-button-checks's Introduction

Simple-button-checks 3

Simple button checks is a simple plugin for transform checkbox inputs into html buttons for css customize. High performance, keyboard support and preserve original input click/change events.

Demos / Documentation

Demo and doc : http://joelthorner.github.io/simple-button-checks/

Getting Started

Includes

<!DOCTYPE html>
<html lang="en">
  <head>
    <link rel="stylesheet" href="path/to/simple-button-checks.css">
  </head>
  <body>

    <script src="path/to/jquery/3.x.x.min.js"></script>
    <script src="path/to/simple-button-checks.js"></script>
  </body>
</html>

Js initialization

//default options
$('input[type="checkbox"]').simpleButtonChecks({
  buttonClass: "sbc-default",
  checkedIcon : '<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"/></svg>',
  nonCheckedIcon : '',
  // 'none' or 'input' or 'all'
  wrapContainer : 'none', 
  btnAttributes : {
    'type' : 'button'
  },
  onInit : null,
  onChange : null,
  changeCallback : null,
  onDestroy: null
});

//equivalent of
$('input[type="checkbox"]').simpleButtonChecks();

Options and Methods

Options and Methods : http://joelthorner.github.io/simple-button-checks/

Radios plugin

https://github.com/joelthorner/simple-button-radios

simple-button-checks's People

Contributors

joelthorner avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.