From 0bbe958685399feb476e1d2bb164c5eeb5c35829 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 23 Sep 2013 22:28:16 +0200 Subject: [PATCH] input readonly support --- index.html | 4 ++-- js/jquery.knob.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index d003bb0..7184b74 100755 --- a/index.html +++ b/index.html @@ -257,11 +257,11 @@

jQuery Knob

× Readonly

+readonly (or data-readOnly=true)
 data-thickness=".4"
 data-fgColor="chartreuse"
-data-readOnly=true
             
- +

× Dynamic

diff --git a/js/jquery.knob.js b/js/jquery.knob.js index d101d36..88a4d47 100755 --- a/js/jquery.knob.js +++ b/js/jquery.knob.js @@ -92,7 +92,7 @@ min : this.$.data('min') || 0, max : this.$.data('max') || 100, stopper : true, - readOnly : this.$.data('readonly'), + readOnly : this.$.data('readonly') || (this.$.attr('readonly') == 'readonly'), // UI cursor : (this.$.data('cursor') === true && 30)