Skip to content
This repository has been archived by the owner on May 25, 2021. It is now read-only.
/ NumbOnly Public archive

A jQuery plugin allows only numerics in HTML inputs

Notifications You must be signed in to change notification settings

devpilot/NumbOnly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Warning!

Plugin is no longer maintined, please use HTML <input type="number" /> instead

jQuery.numbOnly

A jQuery plugin allows only numerics in HTML inputs. It has option for allowing negative and decimal also. On wrong input display popup tip.

Usage

<script type="text/javascript">
    $(document).ready(function(){
        $('#element').numbOnly(options);
    });
</script>

Options

'align' : 'left'/'right'

Text alignment in input. Default: 'right'

'negative' : boolean

Allow one minus(-) sign in input. Default : False

'decimal' : boolean

Allow decimal(.) once in input. Default : True

'showTip' : boolean

Show tip message on wrong input. Default : True

'message' : '<Custom message to display in tip>'

License

Dual licensed under the MIT and GPL licenses.