jQuery Spin Button imageBasePathspinBtnImage/spinUpImage/spinDownImageintervalmax/mintimeIntervaltimeBlink 介绍
Overview
This plugin provides spin-button interface easily on your form.
This interface is very handy to set especially short or middle range numbers.
Usage
Simply call “spin” method.
$(document).ready(function(){ $('#number').spin(); });
<input type="text" id="number" value="0" />
You can specify the options with first argument.
$('#number').spin({max:100,min:0});
Options
imageBasePath
You need to specify your spin-button surface images. When all your spin-
related-images are on a same directory(I hope so), you can set your image path
onto this parameter.
default value is “/img/spin/”.
spinBtnImage/spinUpImage/spinDownImage
The names of spin button images.
default value is “spin-button.png”, “spin-up.png” and “spin-down.png”. (these
files are included in spin-image.tar.gz)
interval
Add/subtract this value from current value, when users click spin button.
default value is 1.
max/min
The maximum/minimum value. Null means unlimited.
default value is null.
timeInterval
While users keep pressing mouse button on the spin-button, the value will be
increasing. This value is the time interval of increasing.
default value is 500(milli seconds)
timeBlink
The time interval of blinking the spin button when increasing/decreasing the
value.
default value is 200(milli seconds)
Notice
You can use decimal as well, however, we always face issue of the float
number. I suggest you do not use decimal.
@R_878_4045@ion
This plugin is very handy using with
jGlycy.
<input type="text" jg="spin" value="0" />
jQuery Spin Button imageBasePathspinBtnImage/spinUpImage/spinDownImageintervalmax/mintimeIntervaltimeBlink 官网
http://plugins.jquery.com/project/spin-button
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。