I declare a following div in file1.html to draw a nice gauge. The div uses some HTML5 Custom Data Attributes as follow:
<div class="gauge" id="meter1" data-settings='
{"value": 7,
"min": 0,
"max": 50,
"threshold": [
{"from": 25, "to": 50, "color": "blue", "label": "Warning"},
{"from": 0, "to": 25, "color": "orange", "label": "Critical"}
]
}'></div>
Now in Javascript, how do I recall the div and set new number for the "value" attribute and "threshold" attribute? Thanks