How do you ringify a block with JavaScript?

Do not move my JavaScript tutorial to "dumb questions".