I need to format the input value, the number in the center of the knob.
I've tried to incorporate the following format code, in different places both in the .js and .html files , without success:
.toLocaleString('no-NOK');
My HTML:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body { font-family:arial; }
input { color:#ffffff !important; font-size: 140% !important; }
#dial { }
</style>
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="jquery.knob.js"></script>
</head>
<body>
<div style="overflow:hidden;margin:auto auto;width:100%;background-color:orange;position:absolute;left:0;right:0;" align="center"><input type="text" id="dial" value="2000000"></div>
<script>
$(function() {
$("#dial").knob({
'fgColor':"#000000",
'lineCap':"round",
'min':100000,
'max':7000000,
'step':100000,
'width':250,
'height':250,
'format': function(v) {
return "Kr. " + v ;
}
});
});
</script>
</body>
</html>
I think you have some mistake in script.