javascript - How can I change the radius of a particular circle when clicking on a button? -
I have already asked a question that when I click on the circle, to change the scope of a circle, I know this Help
& lt; G id = "bubble-nodes" & gt; & Lt; Rect id = "bubble-background" & gt; & Lt; / Rect & gt; & Lt; A class = "class =" bubble-node "> gt; & gt; Circle & gt; & lt; / a & gt; .... & lt; / g > Now, when I click on a button, I am asking, how can I change the radius of a particular circle.
button type = " Button "onclick =" resizeparticular circle ('circle_12') "> I & lt; / button & gt; & gt; g id =" bubble-nodes "& gt; & lt; rect id =" bubble-background " & Gt; & lt; / rect & gt; & lt; a class = "class =" bubble-node "& gt; & Lt; Circle r = "65" id = "circle_12" & gt; & Lt; / Circle & gt; & Lt; / A & gt; .... & lt; / G> Var Recije ParticularCrack = Function (id) {// I have not tried working $ $ ('# circle_12') Atri ('r', '85'); // nope}
In pure javascript / jquery I will probably place a id
in each circle and give reference that to change another element but I How can I do the same thing in 3?
The id
attribute is as follows:
< Code> circle.attr ('id', function (d, i) {return 'circle_' + i;});
Or set square:
circle.attr ('class', function (d, i) {if (i === 12) { Return 'Special Chakra';} and {Return 'General Circle';}});
Comments
Post a Comment