Skip to content

Commit

Permalink
init 0
Browse files Browse the repository at this point in the history
  • Loading branch information
aterrien committed Nov 27, 2011
1 parent e4e4728 commit f81b543
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
11 changes: 10 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@
<head>
<title>jQuery Knob demo</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script src="js/jquery.knob-1.0.0.js"></script>
<script src="js/jquery.knob-1.0.1.js"></script>
<script>
$(function() {
$(".knob").knob(
{
'change':function(e){console.log(e);}
}
);
});
</script>
</head>
<body>
<div style="float:left;width:100%;font-family:Georgia;font-size:70px;font-weight:bold;color:#87CEEB;letter-spacing:-5px">
Expand Down
12 changes: 7 additions & 5 deletions js/jquery.knob-1.0.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $(function() {
$.fn.knob = function( gopt ) {

return this.each(

function() {

var $this = $(this);
Expand Down Expand Up @@ -151,10 +151,10 @@ $(function() {
,PI2 = 2*Math.PI
,mx ,my ,x ,y
,_self = this;

this.onChange = function() {}
this.onRelease = function() {}

this.val = function(_v) {
if(null!=_v){
if( v==_v ) return;
Expand Down Expand Up @@ -189,12 +189,14 @@ $(function() {
this.startDrag = function(e) {

var p = c.position();

x = p.left+(opt.width/2);
y = p.top;

this.capture(e);


//c.css('cursor','none');

$(document).bind(
"mousemove.knob touchmove.knob"
,function(e) {
Expand Down

0 comments on commit f81b543

Please sign in to comment.