Pablo

oneEach(name, fn, [useCapture])

Adds the listener to each element in the collection, but removes the listener on a single element as soon as it has been triggered once on that element.

The listener will still be able to trigger once on other elements in the collection.

Returns the collection.

var svg = Pablo(demoElement).svg({height:80}),
    A   = Pablo.circle({r: 20, cx: 40,  cy: 40, fill: 'red'}),
    B   = Pablo.circle({r: 20, cx: 80,  cy: 40, fill: 'red'}),
    C   = Pablo.circle({r: 20, cx: 120, cy: 40, fill: 'red'});

function toggleFill (e) {
  var elem = e.target;
  if (Pablo(elem).attr('fill') === 'red') {
    Pablo(elem).attr('fill', 'cyan');
  } else {
    Pablo(elem).attr('fill', 'red');
  }
}

// Circle A, B should only keep their event once were 
// as C should keep until manually removed.

C.on('click', toggleFill);
Pablo([A, B]).oneEach('click', toggleFill);

svg.append([A, B, C]);
Painting is just another way of keeping a diary.
Pablo Picasso