Skip to content

A simple, lightweight, custom form elements plugin. Allows styling of checkboxes and radio buttons.

License

Notifications You must be signed in to change notification settings

jmatc/custom-form-elements

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom Form Elements

Version: 1.2

A simple, lightweight, custom form elements plugin. Allows styling of checkboxes and radio buttons.

View the Demo

Usage:

Apply customFormElements() to a checkbox and/or radio button to allow simple styling of each, based on image sprite.

Settings/defaults:

beforeUnChecked : ( function ) executes callback function before unchecking styled target checkbox
afterUnChecked : ( function ) executes callback function after unchecking styled target checkbox
beforeChecked : ( function ) executes callback function before checking or selecting styled target
afterChecked : ( function ) executes callback function after checking or selecting styled target


Example usage ( no callback ):

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

checkBox.customFormElements();

Example usage ( with callback ):

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

checkBox.customFormElements({
  beforeChecked : function (){
    alert('Before checked');
  }
});

About

A simple, lightweight, custom form elements plugin. Allows styling of checkboxes and radio buttons.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published