GimmeObject

  • length
    • returns the number of elements in the GimmeObject.
  • entities()
    • returns a native javascript array containing all the elements in the GimmeObject.
  • sort(sortFn)
    • sorts the elements in the GimmeObject based on the logic from the sortFn argument
    • returns: the modified GimmeObject
  • reverse()
    • reverses the order of the elements in the GimmeObject
    • returns: the modified GimmeObject
  • push(elem, _..._)
    • inserts an element (or elements) at the tail end of the GimmeObject
    • returns: the modified GimmeObject
  • pop()
    • removes the element at the tail end of the GimmeObject
    • returns: the modified GimmeObject (NOT the popped element)
  • shift
    • removes the element at the head of the GimmeObject
    • returns: the modified GimmeObject (NOT the shifted out element)
  • unshift(elem, _..._)
    • inserts an element (or elements) at the head of the GimmeObject
    • returns: the modified GimmeObject
  • slice(startIndex, _endIndex_)
    • returns a slice of the GimmeObject as new GimmeObject
    • startIndex: 0-based index at which the slice should begin
    • endIndex (optional): 0-based index at which the slice should end (the element at this index will NOT be included in the slice). If omitted, the slice will be from the startIndex to the end.
  • splice(startIndex, _count_)
    • returns a splice of the GimmeObject as a new GimmeObject
    • startIndex: 0-based index at which the splice should begin
    • count (optional): desired number of elements in the returned splice. If omitted, the splice will be the number of elements remaining beyond the startIndex (including the element at the startIndex).
  • concat(GimmeObject (or) Array (or) elem, _..._)
    • returns a new GimmeObject merged with whatever is passed into the method.
    • GimmeObject: merge two GimmeObjects together by passing in another GimmeObject
    • Array: merge a GimmeObject and a native javascript array by passing in an array.
    • elem: pass in a single element or a comma separated list of elements to merge them all with the GimmeObject
  • indexer
    • (square-bracket notation for accessing underlying elements in a GimmeObject)
  • element(n)
    • retrieves a native DOM element from the GimmeObject's underlying collection.
    • returns: native DOM element

Last edited Jul 23, 2010 at 10:55 PM by sstchur, version 13

Comments

No comments yet.