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

Latest commit

 

History

History
48 lines (36 loc) · 994 Bytes

README.md

File metadata and controls

48 lines (36 loc) · 994 Bytes

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.