jQuery Knob bug in Chrome

533 views Asked by At

I have an issue with jQuery Knob in Google Chrome:

Everything displays OK until I change the page and click the browser's back button. The percentage is repeated and the circle doesn't display until I refresh the page. Please check this link for example:

http://gcmdesign.net/temp/knob/

Click the link and then the back button of the browser.

Anyone has any idea why this is happening? I've tested in FF, IE, safari and it displays OK. Only in Chrome I have this issue.

1

There are 1 answers

2
Irvin Dominin On

I think the problem is because when you get the value with this.cv it has the %, so it's not a valid number.

Try this (not tested):

$(".dial").knob({
    'draw' : function () { 
        $(this.i).val(this.cv.replace('%','') + '%');
    }
});