Forums

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

Home Forums JavaScript Filter example in JQuery docs

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #45316
    pencil
    Member

    Please explain how the following jquery snippet works

    http://pastebin.com/xVWsjj8u

    Jquery docs says this code will alter the first list item only, as it contains exactly one “strong” tag

    I am confused about the “this” part in the following line of code. I believe “this” returns “li”elements and I can not correlate it with strong

    return $(‘strong’, this).length == 1;

    #137800
    pencil
    Member

    nice @jamy_za
    Thank you

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