jQuery Knob
=============
- canvas based ; no png or jpg sprites.
- touch, mouse and mousewheel, keyboard events implemented.
- downward compatible ; overloads an input element.
Example
-------
<input type="text" value="75" class="dial">
<script>
$(function() {
$(".dial").knob();
});
</script>
Options
-------
Options are provided as attributes 'data-option':
<input type="text" class="dial" data-min="-50" data-max="50">
... or in the "knob()" call :
$(".dial").knob({
'min':-50
,'max':50
});
The following options are supported :
Behaviors :
* min : min value | default=0.
* max : max value | default=100.
* step : step size | default=1.
* angleOffset : starting angle in degrees | default=0.
* angleArc : arc size in degrees | default=360.
* stopper : stop at min & max on keydown/mousewheel | default=true.
* readOnly : disable input and events | default=false.
UI :
* cursor : display mode "cursor", cursor size could be changed passing a numeric value to the option, default width is used when passing boolean value "true" | default=gauge.
* thickness : gauge thickness.
* lineCap : gauge stroke endings. | default=butt, round=rounded line endings
* width : dial width.
* displayInput : default=true | false=hide input.
* displayPrevious : default=false | true=displays the previous value with transparency.
* fgColor : foreground color.
* inputColor : input value (number) color.
* font : font family.
* fontWeight : font weight.
* bgColor : background color.
Hooks
-------
<script>
$(".dial").knob({
'release' : function (v) { /*make something*/ }
});
</script>
* 'release' : executed on release
Parameters :
+ value : int, current value
* 'change' : executed at each change of the value
Parameters :
+ value : int, current value
* 'draw' : when drawing the canvas
Context :
- this.g : canvas context 2D (see Canvas documentation)
- this.$ : jQuery wrapped element
- this.o : options
- this.i : input
- ... console.log(this);
* 'cancel' : triggered on [esc] keydown
* 'error' : called if the browser doesn't support canvases and the plugin didn't initialize as a result
The scope (this) of each hook function is the current Knob instance (refer to the demo code).
Example
-------
<input type="text" value="75" class="dial">
<script>
$(".dial").knob({
'change' : function (v) { console.log(v); }
});
</script>
Dynamically configure
-------
<script>
$('.dial')
.trigger(
'configure',
{
"min":10,
"max":40,
"fgColor":"#FF0000",
"skin":"tron",
"cursor":true
}
);
</script>
Set the value
-------
<script>
$('.dial')
.val(27)
.trigger('change');
</script>
Supported browser
-------
Tested on Chrome, Safari, Firefox, IE 9.0.
MIT License
-------
Copyright (C) 2013 Anthony Terrien
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
嵌入式优质项目,资源经过严格测试可直接运行成功且功能正常的情况才上传,可轻松copy复刻,拿到资料包后可轻松复现出一样的项目。 本人单片机开发经验充足,深耕嵌入式领域,有任何使用问题欢迎随时与我联系,我会及时为你解惑,提供帮助。 【资源内容】:包含完整源码+工程文件+说明,项目具体内容可查看下方的资源详情。 【附带帮助】: 若还需要嵌入式物联网单片机相关领域开发工具、学习资料等,我会提供帮助,提供资料,鼓励学习进步。 【本人专注嵌入式领域】: 有任何使用问题欢迎随时与我联系,我会及时解答,第一时间为你提供帮助,CSDN博客端可私信,为你解惑,欢迎交流。 【建议小白】: 在所有嵌入式开发中硬件部分若不会画PCB/电路,可选择根据引脚定义将其代替为面包板+杜邦线+外设模块的方式,只需轻松简单连线,下载源码烧录进去便可轻松复刻出一样的项目 【适合场景】: 相关项目设计中,皆可应用在项目开发、毕业设计、课程设计、期末/期中/大作业、工程实训、大创等学科竞赛比赛、初期项目立项、学习/练手等方面中 可借鉴此优质项目实现复刻,也可以基于此项目进行扩展来开发出更多功能
资源推荐
资源详情
资源评论
收起资源包目录
基于树莓派设计的智能家居系统.zip(毕设/课设/竞赛/实训/项目开发) (313个子文件)
.classpath 529B
fancyzoom.coffee 3KB
bootstrap.css 118KB
bootstrap.min.css 98KB
jquery-ui.min.css 26KB
font-awesome.css 25KB
theme.css 21KB
font-awesome.min.css 20KB
bootstrap-theme.css 15KB
bootstrap-theme.min.css 13KB
premium.css 11KB
fullcalendar.css 11KB
style.css 5KB
fileinput.css 4KB
fileinput.min.css 3KB
login.css 2KB
isotope.css 1KB
fullcalendar.print.css 668B
elements.css 417B
fancyzoom.css 317B
layout.css 91B
fontawesome-webfont.eot 71KB
glyphicons-halflings-regular.eot 20KB
index.ftl 7KB
cmdInfo.ftl 4KB
login.ftl 3KB
cmd.ftl 2KB
user.ftl 2KB
userInfo.ftl 1KB
addUser.ftl 1KB
addCmd.ftl 1KB
index.ftl 9B
loading-sm.gif 3KB
animated-overlay.gif 2KB
arrow-down.gif 916B
arrow-up.gif 916B
arrow-right.gif 897B
arrow-left.gif 891B
loading.gif 847B
.gitignore 64B
pie.html 40KB
multiple-axes.html 25KB
time.html 17KB
index.html 13KB
percentiles.html 7KB
visitors.html 5KB
selection.html 5KB
turning-series.html 5KB
ajax.html 5KB
navigate.html 4KB
interacting-axes.html 4KB
external-dragging.html 4KB
zooming.html 3KB
tracking.html 3KB
interacting.html 3KB
annotating.html 3KB
realtime.html 3KB
stacking.html 3KB
index.html 2KB
selectable.html 2KB
resize.html 2KB
graph-types.html 2KB
setting-options.html 2KB
theme.html 2KB
thresholding.html 2KB
agenda-views.html 2KB
basic-views.html 2KB
image.html 2KB
symbols.html 2KB
default.html 2KB
basic.html 1KB
gcal.html 1KB
json.html 1KB
index.html 1KB
403.html 523B
500.html 523B
404.html 523B
jave-1.0.2.jar 5.6MB
HttpPoolUtil.java 12KB
PinyingUtil.java 12KB
RCSwitch.java 9KB
ZaqRecord.java 9KB
BaseDao.java 7KB
Record.java 7KB
LoginController.java 7KB
RF433ReceiveTest.java 6KB
AudioUtil.java 6KB
Csb.java 6KB
CsbTest.java 6KB
Player.java 6KB
WebConfig.java 6KB
STTutil.java 5KB
TTSutil.java 5KB
CmdDB.java 5KB
HttpUtil.java 4KB
RF315_4SendTest.java 4KB
RF433SendTest.java 3KB
RF433.java 3KB
UserDB.java 3KB
ShiroConfig.java 3KB
共 313 条
- 1
- 2
- 3
- 4
资源评论
阿齐Archie
- 粉丝: 3w+
- 资源: 2469
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功