jQuery-Knob
jQuery-Knob copied to clipboard
data value is not in middle of knob when using rtl
when using rtl direction in page , data value is not in the middle of knob and would be printed in left side with distance and sometimes it would be out of parent element.
I solved this by simply adding the following to the input. style="display:inline;"
It's not stupid if it works :)
@jimmyheller I solve this problem with this code in draw function
$(".knob").knob({
draw: function () {
//style rtl
this.i.css({
'margin-right': '-' + ((this.w * 3 / 4 + 2) >> 0) + 'px',
'margin-left': 'auto'
});
},
});
Thank you @mortezakarimi , your solution worked for us too.