In the following code, assume that $sel
is some arbitrary d3.js selection:
$sel.each(function(d, i, j) {
var prev = ??? ;
...
});
What can I replace the ???
to assign to prev
a d3.js selection consisting of the previous sibling of this
(if any such exists)?
(If this
is a first child, and therefore has no previous sibling, an empty d3.js selection should be assigned to prev
.)