Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery UI Examples - Spinner (Spinner)

jQuery UI Examples - Spinner (Spinner)

Enhance text input for numeric values with up/down buttons and arrow key handling.

For more details about the spinner widget, see the API documentation Spinner Widget。

Default functionality

The default spinner.









  

  jQuery UI 旋转器(Spinner) - 默认功能

  

  

  

  

  

  





 


Currency

This example is a donation form with a currency selector and a quantity spinner.









  

  jQuery UI 旋转器(Spinner) - 货币

  

  

  

  

  

  

  

  

  





 


Decimal

This example is a decimal spinner with the step set to 0.01. The code handling culture changes reads the current value of the selector and, when the culture changes, reformats the value based on the new culture.









  

  jQuery UI 旋转器(Spinner) - 小数

  

  

  

  

  

  

  

  

  





 


Map

Google Maps integration, using spinners to change latitude and longitude.









  

  jQuery UI 旋转器(Spinner) - 地图

  

  

  

  

  

  

  

  





 







Overflow

The overflow spinner limits the range from -10 to 10. Values above 10 wrap around to -10, and vice versa.









  

  jQuery UI 旋转器(Spinner) - 溢出

  

  

  

  

  

  





 


Time

A custom widget extending the spinner. It uses the Globalization plugin to parse and output timestamps, with custom step and page options. The up/down arrows increment/decrement minutes, and page up/down increments/decrements hours.









  

  jQuery UI 旋转器(Spinner) - 时间