A
A
Alexander Shtang2016-01-13 07:39:33
JavaScript
Alexander Shtang, 2016-01-13 07:39:33

So how do you change the radius of an svg circle using input-range?

(Maybe even with Angular?)
Now, if it looks something like this:
codepen.io/Enclave88/pen/GovowP

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
profesor08, 2016-01-13
@Enclave88

It's that simple:

var circle = document.querySelector("circle");
document.querySelector("input").addEventListener("input", function() {
  circle.setAttribute("r", this.value);
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question