开发者

Sciptaculous number spinner

开发者 https://www.devze.com 2022-12-27 20:43 出处:网络
does anybody know of the existence of a number spinner component compatible with prototype/scriptaculous? Something like jQuery\'s spinner.

does anybody know of the existence of a number spinner component compatible with prototype/scriptaculous? Something like jQuery's spinner.

I'm looking for nothing fancy, just numbers开发者_JAVA百科.


A quick example:

HMTL

<input id="spinner" type="text" value="0" readonly="readonly">
<div id="up">▲</div>
<div id="down">▼</div>

Prototype 1.6

$('up').observe('click', function() { $('spinner').value++; });
$('down').observe('click', function() { $('spinner').value--; });​

Detailed version here (with CSS already).

PS: only tested on firefox and chrome

0

精彩评论

暂无评论...
验证码 换一张
取 消