jQueryGetElement

Gets the element in the active tab, satisfying the specified conditions

Syntax

jQueryGetElement = function(aSelector, aIndex);

Parameters

Returned value

  • functions: structure that contains the parameters of the found element

Notes

  • If the index of the desired element aIndex is -1, it will be obtained a random element from the found
  • If none are found, then the resultant structure of the field will be empty.
  • Found element is highlighted by a dotted frame

Examples

  1. //Select the first element div with id = sidebar
    var element = jQueryGetElement('div#sidebar',0);
    //If the element is found, the
    if (element.varName !== ''){
    //Emulate a click on it
      ClickElement(element);
    }
  2. //Select a random span element that is in a div element
    var element = jQueryGetElement('div span',-1);
  3. //Select the second img element that is after a span element
    var element = jQueryGetElement('span + img',1);