Forums

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

Home Forums JavaScript Help me with this JavaScript Code

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #238297
    delta
    Participant

    Okay, so this code is an unordered list with a search input box and a submit button to search and focus/highlight an item in the unordered list. Check out the list to see the different ways ive formatted the list items. I donr understand why but I can only search for list items that are anchors, and Id like my list items to be spans. Why dosnt it search for ids that are a span tag? It works fine when you search for ids that are an anchor tag. How can I get it to search for and focus/highlight spans and not just anchor tags?

    http://codepen.io/d9esco/pen/PZrvNo

    #238317
    Shikkediel
    Participant

    I would think it does search for ids within a span tag, it’s just that this particular element can’t be focused.

    Highlighting text is a bit more complicated.

    #238330
    delta
    Participant

    What tag elements can be focusted on? there must be a way to focus on spans

    #238332
    Shikkediel
    Participant
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.