Skip to content
This repository has been archived by the owner on Apr 2, 2023. It is now read-only.
/ numbertor Public archive

Numbertor is a jQuery-based addon for input boxes, giving them a number sanitizer.

License

Notifications You must be signed in to change notification settings

QODIO/numbertor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEPRECATED - no longer actively maintained

Numbertor

Numbertor is a jQuery-based addon for input boxes, giving them a number sanitizer. You can see a demo here.

Usage

include in head:
<script src="jquery-1.11.0.min.js"></script>
<script src="fm.numbertor.jquery.js"></script>
to activate replacement:
$('#inputBox').numbertor();

If you don't wan't to meddle with scripting, there is an alternative to activate replacement, by using inline markup.

<input type="text" class="numbertor" data-numbertor-allow-empty="true">
if you want to change settings:
$('#inputBox').numbertor({
    decimals: 'auto',        // number of decimals to use
    decimalSeperator: ',',   // the decimal seperator to be used
    thousandSeperator: '.',  // the thousand seperator to be used
    allowEmpty: false        // if false, then value will be set to 0 when empty
});

jQuery methods

Method Description
destroy This method is used to remove the instance of the plugin from the input box.
Method usage
$('#inputBox').numbertor('destroy');

Browser compatibility

  • IE 8+
  • Chrome 3+
  • Firefox 3.6+
  • Safari 5+
  • Opera 10.5+

Copyright and license

The MIT License (MIT)

Copyright (c) 2014 Qodio

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Numbertor is a jQuery-based addon for input boxes, giving them a number sanitizer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published