• Checks to see whether or not the specified element's bounding box is in the viewport

    Parameters

    • elem: Element

      The element to check

    • completely: boolean = false

      if true, this function will only return true if the element is completely within the viewport. Otherwise, it will also return true if the element is partially in the viewport

    Returns boolean

    Whether or not the element is in the viewport