Description

(>=1.3.1) Retrieves an element by its index in the array

Usage

Parameters

  • index {Integer}

    An integer indicating the 0-based position of the element. If index < 0, an integer indicating the position of the element, counting backwards from the last element in the set.

Returns

CanvasEngine.Element

Example

In method ready

var el1 = this.createElement(),
    el2 = this.createElement(),
    el3 = this.createElement();

stage.append(el1, el2, el3);

stage.eq(1); // returns el2 element
stage.eq(-1); // returns el3 element

Discussion