jquery.ghostFormat

jQuery plugin for formatting inputs

View the Project on GitHub miahabdu/jquery.ghostFormat

Basic Example

The following input returns numbers as currency by default

('#first_example').ghostFormat();

Type Paramater Example

The following input returns numbers in phone format. Note that the input must be the full 10-digit phone number

$('#second_example').ghostFormat({type: 'phone'});

The next input returns numbers in SSN format. Note that the input must be the full 9-digit social security number

$('#third_example').ghostFormat({type: 'ssn'});

inputClass Paramater Example

The following input is an example of default type and inputClass paramaters passed in

$('#fourth_example').ghostFormat({inputClass: 'form-control input-sm'});

The following input is an example of phone type and inputClass paramaters passed in

$('#fifth_example').ghostFormat({type: 'phone', inputClass: 'form-control input-sm'});