Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

arthurshlain/JQuery-Optional-Step

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

JQuery Optional Number Step

Dynamic HTML5 number step.

HTML5 forms has own validation for step rule.

This plugin add step attribute to field temporarily while changes are made.

You can specify any numeric value on keyboard.

HTML5 step validation will not be applied.

Demo

https://codepen.io/ArtZ91/pen/omePje

How to use

  1. include jquery.number-step.js script to your web page. jQuery required!
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="jquery.number-step.js"></script>
  1. Add optionalNumberStep function to your input[type="number"] fields.
$('[name="width"]').optionalNumberStep(100);
  1. To deactivate dynamic step use 'unset' value.
$('[name="width"]').optionalNumberStep('unset');

About

Dynamic HTML5 number step

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published