Answer the question
In order to leave comments, you need to log in
How to put the result of this loop into a function?
Good day everyone!
I can’t figure it out (
I’m working with the snap.svg plugin, I need to somehow shove each object in the loop into a function under the loop
for (var i = 0; i < svg.length; i++) {
var x = svg[i].coord_x
var y = svg[i].coord_y
var rect = s.rect(x, y, 20, 20).attr({
class: 'seat',
id: svg[i].id
})
}
//////////////////////
var set = s.g( каждый элемент из цикла );
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question