Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Array Key Zero [0] in Jquery?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #39263
    samnizamani
    Member

    var textarea_height = $(this)[0].scrollHeight();
    Wht does this zero index mean? It has been confusing me for a long tym?

    And what is the difference between innerHeight And ScrollHeight In Jquery! Thx in advance…

    #107529
    TheDoc
    Member

    It appears that the [0] is only used when trying to return scrollHeight. I have no idea what scrollHeight is, as I’ve never used it.

    Here’s an explanation of the [0]: http://stackoverflow.com/a/6921849/1339786

    innerHeight is the height of an element, including its padding but not including its border.

    #107580
    samnizamani
    Member

    thx, I am still confused y it’s used with scrollheight… :/

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.