Skip to content

ele.target()

eles.target — Collection > Traversing > Incidence and neighbourhood. Cytoscape.js signatures, parameters and return contract.

eles.target — Collection › Traversing › Incidence and neighbourhood

Preview · Collection › Traversing › Incidence and neighbourhood

Read in the complete API reference · All API members

// The target node of the first edge
ele.target(): Collection<NodeData, EdgeData, NodeData>

The target node of the first edge.

Returns Collection<NodeData, EdgeData, NodeData>

the target node, or an empty collection for a non-edge

Example

console.log(cy.getElementById('ab').target().id()); // 'b'

Example graph and handle setup