-
Notifications
You must be signed in to change notification settings - Fork 0
Allows only valid characters (i.e. numbers) to be typed into a text box. Can take negative numbers and a decimal point. You can supply a callback that runs when focus is lost and the value in the text box is not a valid number.
sagasu/JQeury.Numeric
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Allows only valid characters (i.e. numbers) to be typed into a text box. Can take negative numbers and a decimal point. You can supply a callback that runs when focus is lost and the value in the text box is not a valid number. I am not an owner of a source code. I just created a nuget package to keep all dependencies in nuget. All the credit goes to http://www.texotela.co.uk/. I decided to fork, because Author do not anwser emails, and seems to not be interested in a project any more. Feel free to contact me in order to fix some bugs or add features. In order to run it place in a view: <script type="text/javascript"> $(".numeric").numeric(); $(".integer").numeric(false, function() { alert("Integers only"); this.value = ""; this.focus(); }); $(".positive").numeric({ negative: false }, function() { alert("No negative values"); this.value = ""; this.focus(); }); $(".positive-integer").numeric({ decimal: false, negative: false }, function() { alert("Positive integers only"); this.value = ""; this.focus(); }); </script>
About
Allows only valid characters (i.e. numbers) to be typed into a text box. Can take negative numbers and a decimal point. You can supply a callback that runs when focus is lost and the value in the text box is not a valid number.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published