+ 3

Why isn't this code working?

I tried to write a code where a svg circle's radius is changed using javascript but it did not work. Any help would be greatly appreciated. https://code.sololearn.com/WeT12Yxt7vv1/?ref=app

5th Jan 2020, 8:06 AM
๐Ÿ‡ฒโ€‹๐Ÿ‡ดโ€‹๐Ÿ‡ญโ€‹๐Ÿ‡ฆโ€‹๐Ÿ‡ฒโ€‹๐Ÿ‡ฒโ€‹๐Ÿ‡ฆโ€‹๐Ÿ‡ฉโ€‹ ๐Ÿ‡ฏโ€‹๐Ÿ‡ฎโ€‹๐Ÿ‡ฑโ€‹๐Ÿ‡ฆโ€‹๐Ÿ‡ณโ€‹
๐Ÿ‡ฒโ€‹๐Ÿ‡ดโ€‹๐Ÿ‡ญโ€‹๐Ÿ‡ฆโ€‹๐Ÿ‡ฒโ€‹๐Ÿ‡ฒโ€‹๐Ÿ‡ฆโ€‹๐Ÿ‡ฉโ€‹ ๐Ÿ‡ฏโ€‹๐Ÿ‡ฎโ€‹๐Ÿ‡ฑโ€‹๐Ÿ‡ฆโ€‹๐Ÿ‡ณโ€‹ - avatar
2 Answers
+ 6
Mohammad change this line 12: b['r']="30"; by this: b.setAttribute('r',30); alternative solution : b.style['r']="30"; or b.style.r="30"; You may omit quotation marks of value if you don't need to include units. Default unit would be pixels.
5th Jan 2020, 8:18 AM
๐Ÿ‡ฎ๐Ÿ‡ณOmkar๐Ÿ•‰
๐Ÿ‡ฎ๐Ÿ‡ณOmkar๐Ÿ•‰ - avatar
+ 2
Omkar thanks a lot... it worked
5th Jan 2020, 8:48 AM
๐Ÿ‡ฒโ€‹๐Ÿ‡ดโ€‹๐Ÿ‡ญโ€‹๐Ÿ‡ฆโ€‹๐Ÿ‡ฒโ€‹๐Ÿ‡ฒโ€‹๐Ÿ‡ฆโ€‹๐Ÿ‡ฉโ€‹ ๐Ÿ‡ฏโ€‹๐Ÿ‡ฎโ€‹๐Ÿ‡ฑโ€‹๐Ÿ‡ฆโ€‹๐Ÿ‡ณโ€‹
๐Ÿ‡ฒโ€‹๐Ÿ‡ดโ€‹๐Ÿ‡ญโ€‹๐Ÿ‡ฆโ€‹๐Ÿ‡ฒโ€‹๐Ÿ‡ฒโ€‹๐Ÿ‡ฆโ€‹๐Ÿ‡ฉโ€‹ ๐Ÿ‡ฏโ€‹๐Ÿ‡ฎโ€‹๐Ÿ‡ฑโ€‹๐Ÿ‡ฆโ€‹๐Ÿ‡ณโ€‹ - avatar