Questions tagged [jquery-knob]

An jQuery-based spinner/dial control.

jQuery Knob canvas based ; no png or jpg sprites. touch, mouse and mousewheel, keyboard events implemented. downward compatible ; overloads an input element.

Useful links:

Example

<input type="text" value="75" class="dial">

$(function() {
    $(".dial").knob();
}

enter image description here

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.
    • 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" | default=gauge.
    • thickness : gauge thickness.
    • width : dial width.
    • displayInput : default=true | false=hide input.
    • displayPrevious : default=false | true=displays the previous value with transparency.
    • fgColor : foreground color.
    • bgColor : background color.

  • Hooks

    $(".dial").knob({ 'release' : function (v) { /make something/ } });

  • '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


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.

145 questions
0
votes
1 answer

JQuery knob, input slider and web audio oscillator connecting but not working

I have the web audio api and the JQuery knob library kind of working... but not quite. The knob slider controls an input slider but the value doesn't seem to be passed to the param I want to affect. For a simple example see here:…
William
  • 4,422
  • 17
  • 55
  • 108
0
votes
2 answers

Knob multiple value is not working

I am using jQuery 1.8 and aterrien's jQuery-Knob I made a circle by with animation by a input and managing the value by rel attribute. Check following code:
itskawsar
  • 1,232
  • 1
  • 19
  • 30
0
votes
2 answers

jQuery: Animate Knob inside FineUploader callback

I'm using jQuery libs FineUploader & Knob for a faux circular loading effect. My current code is: $('.dial').val(0).trigger('change').delay(2000); var myKnob = $(".dial").knob({ 'min': 0, 'max': 100, 'readOnly':…
Kevin Brown
  • 12,602
  • 34
  • 95
  • 155
0
votes
0 answers

How to specify border attribute to a knob object in jquery?

I have this code snippet for extending my knob properties... thickness : this.$.data('thickness') || 0.29, width : this.$.data('width') || 70, height : this.$.data('height') || 70, how to include…
user2067736
  • 1,615
  • 2
  • 13
  • 11
0
votes
1 answer

jQuery Knob plugin, stop repeating animations (slideDown, slideUp)

I use the knob plugin. jsFiddle It worked greatly till I added the following code to change values on hover (line 327): .bind( "mousemove" , function (e) { e.preventDefault(); s._xy()._mouse(e); } ) I need to…
0
votes
2 answers

Round Jquery UI slider

I'm looking for something similar to jqueryui slide. But the main problem in my case it's round design for slider. I've seen Knob control but it doesn't have range and control buttons. Shoot me a link if you know such an example. Thanks.
Max
  • 1
  • 1
  • 1
0
votes
1 answer

looking for a round progress bar with up and down functionally

I'm looking for a round progress bar for my site, I need to progress bar to show a router output power when users are near and away from the router so I need a progress bar to be up and down functionally. I find these two,but I'm having problem to…
user1844586
  • 39
  • 2
  • 5
0
votes
1 answer

jQuery Knob display

I'm using this jQuery knob. http://anthonyterrien.com/knob/ I'm using semi circle & i need to show min. & max limits below the knob. By default it doesn't show limits. Also is it possible to show current knob value (shown at middle of knob) to be…
benjamin54
  • 1,280
  • 4
  • 28
  • 48
-1
votes
1 answer

How to make the jQuery Knob background color transparent

At this address you can find a beautiful plugin: https://github.com/aterrien/jQuery-Knob You can configure it, indicating the background and the foreground color. I want to set a transparency on the background color. I've read something about…
frankcecca
  • 149
  • 3
  • 13
-1
votes
1 answer

edit jquery-knob counter to display fraction of second

I create time counter using Knob: $(function($) { $(".knob").knob({ 'fgColor': '#b9e672', 'thickness': 0.3, 'width':150, 'data-min': 0, 'data-max':…
mwafi
  • 3,946
  • 8
  • 56
  • 83
1 2 3
9
10