I have a DIV that looks like this...utilizing the "data-gauge" attribute.
<div class="uib-justgage gauge no_wrap widget uib_w_6" data-uib="widgets/justgage" data-ver="0" id="uib-justgage-3" data-gauge="{'service method':'none','controller type':'single','data path':'not set','title':'Marry','label':'Marry','value':120,'min':0,'max':200,'hideMinMax':0,'hideValue':0,'hideInnerShadow':1}"
data-rpath="null" data-array="not set"></div>
What I would like to do is update a couple of the values via jQuery - namely "value" and "max" to new values.
What would the syntax for that be? I'm new to jQuery and figure it would be something like:
$.("#uib-justgage-3").something.value=x;
$.("#uib-justgage-3").something.max=y;
Thanks in advance
you can do it like this:
Then access it like
Here's a little example, it sets the data, then reads it when you click:
You could use either
$("#uib-justgage-3").data('gauge')
or$("#uib-justgage-3").attr('data-gauge')
for reading the attributeand
$("#uib-justgage-3").data('gauge','new value')
or$("#uib-justgage-3").attr('data-gauge','new value')
for setting the attribute