views:

126

answers:

1

Hi, does anybody know of the existence of a number spinner component compatible with prototype/scriptaculous ? Something like jquery's spinner (http://docs.jquery.com/UI/Spinner). I'm looking for nothing fancy, just numbers.

Thanks!

A: 

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

Rui Carneiro