gijsroge / stepper.js Goto Github PK
View Code? Open in Web Editor NEWjQuery library that adds external controls for input[type=number] so it's themeable
License: MIT License
jQuery library that adds external controls for input[type=number] so it's themeable
License: MIT License
if you right click on the stepper button it will continue to increment until you focus on another element.
Error: Attribute 'spinner-button' not allowed on element button at this point.
Try it validate via W3org HTML validator
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<div class="js-spinner">
<input type="number" step="1" max="10" min="0" data-stepper-debounce="400" class="js-stepper">
<button type="button" spinner-button="up" title="add 1">+</button>
<button type="button" spinner-button="down" title="subtract 1">-</button>
</div>
<script src="jquery.js"></script>
<script src="stepper.js"></script>
</body>
We should use some data
attribute instead. Like data-spinner-button="up"
.
When is_touch_device
function returns true
then simple mouse click on up/down buttons does not work.
Occurs on a touch screen notebook where the mouse is also used.
Hot fix is to use only click
(or mousedown
) event like it was before commit Added touch device check and added touchstart event for UX reasons. But then you lost better UX on touch devices. :/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.