Skip to content

Commit

Permalink
input readonly support
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Sep 23, 2013
1 parent 6b5848c commit 0bbe958
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,11 @@ <h1>jQuery Knob</h1>
<div class="demo">
<p>&#215; Readonly</p>
<pre>
readonly (or data-readOnly=true)
data-thickness=".4"
data-fgColor="chartreuse"
data-readOnly=true
</pre>
<input class="knob" data-fgColor="chartreuse" data-thickness=".4" data-readOnly=true value="22">
<input class="knob" data-fgColor="chartreuse" data-thickness=".4" readonly value="22">
</div>
<div class="demo">
<p>&#215; Dynamic</p>
Expand Down
2 changes: 1 addition & 1 deletion js/jquery.knob.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0bbe958

Please sign in to comment.