From 387f1d467739068433b83a5722f233a7ebda4be9 Mon Sep 17 00:00:00 2001 From: cericthered Date: Fri, 29 Jan 2016 16:14:02 -0700 Subject: [PATCH 1/2] Update parse function to handle string with commas --- js/jquery.knob.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/jquery.knob.js b/js/jquery.knob.js index 792313c..d545055 100644 --- a/js/jquery.knob.js +++ b/js/jquery.knob.js @@ -132,6 +132,12 @@ return v; }, parse: function (v) { + + //if string, remove commas, so parseFloat will get the right value + if (typeof v === 'string') { + v = v.replace(",", ""); + } + return parseFloat(v); } }, this.o From 9cac9429364b97cdf54d62be64fe1b11c833ae42 Mon Sep 17 00:00:00 2001 From: cericthered Date: Fri, 29 Jan 2016 16:16:31 -0700 Subject: [PATCH 2/2] Update jquery.knob.js --- js/jquery.knob.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/jquery.knob.js b/js/jquery.knob.js index d545055..0780d99 100644 --- a/js/jquery.knob.js +++ b/js/jquery.knob.js @@ -133,10 +133,10 @@ }, parse: function (v) { - //if string, remove commas, so parseFloat will get the right value - if (typeof v === 'string') { - v = v.replace(",", ""); - } + //if string, remove commas, so parseFloat will get the right value + if (typeof v === 'string') { + v = v.replace(",", ""); + } return parseFloat(v); }