Skip to content

miahabdu/jquery.ghostFormat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text Input Formatting Plugin for jQuery

Click here to see a demo and example code

jquery.ghostFormat is a lightweight text field input foramatter plugin for jQuery. It allows for customizing input formats for numbers without changing the values that are saved to the database.

Requirements

Usage

$('.example_input').ghostFormat();

The above code will intialize ghostFormat on the selected inputs with default options. The default format converts the inputted values to currency (dollars).

You can customize which format you want returned by passing in options as parameters.

$('.example_input').ghostFormat(options);

options parameters are detailed below.

Options

  • type
    Specifies the format type returned by ghostFormat. The plugin currently accepts the following types passed in as a string: "money" "phone" "ssn" default: "money"

  • inputClass
    Allows for passing in custom classes to the formatted text field input; Accepts string containing all classes: "form-control input-sm" default: ""

Help

Submit a GitHub Issue request.


This software is made available under the open source MIT License. © 2014 Abdul Miah and contributors

About

jQuery plugin for formatting inputs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published