# jquery-range-picker
**Repository Path**: bluishoul/jquery-range-picker
## Basic Information
- **Project Name**: jquery-range-picker
- **Description**: 用于选取某个区段值
- **Primary Language**: JavaScript
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 20
- **Forks**: 10
- **Created**: 2013-08-01
- **Last Updated**: 2024-06-14
## Categories & Tags
**Categories**: jquery-plugins
**Tags**: None
## README
# jquery-range-picker
>选择区间值的独立 jQuery 组件
## 一、演示
### 1、地址:
http://sandbox.runjs.cn/show/aphyogeq
### 2、效果图:
## 二、如何使用
### 1、引入库
### 2、添加 Dom 节点
### 3、启用 jquery-range-picker 插件,并配置参数
## 三、参数说明
`from`:开始区间值(默认值:0)
`to` :结束区间值(默认值:∞)
`ranges` :各区间值 (默认值:[0,1000,2000,5000,10000,'∞'])
`axis_width` :轴长度 (默认值:200)
`picker_width` :选取块宽度 (默认值:8)
`show_seperator` :是否显示分割线 (默认值:true)
`animate` :是否启用动画 (默认值:false)
`onSelect` :当 drag 结束,选定好某个区间时调用(如下:this为当前控件实例,index:选取块所在区间序号,from_to:区间值数组)
onSelect:function(index,from_to){
var self = this;
var from = from_to[0];
var to = from_to[1];
}
`beforeInit` :控件初始化前调用 (this为当前控件实例)
`afterInit` :控件初始化后调用 (this为当前控件实例)
`picker.options` :picker 为控件实例,`picker.options`为所有配置参数