Forums

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

Home Forums JavaScript Making Words with Special Characters Bold

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #172998
    darklord98703
    Participant

    Hi, I’m Having a problem with a website i’m designing that uses Hastags, to make this short I need to make all words that start with the (#) Character Bold, how is this possible?

    Note: I worte a code to make all words that start with (#) linkable, I don’t use classes for this.

    Thanks.

    #173003
    Paulie_D
    Member

    CSS cannot detect content…it can only style it.

    You would have to use JS/Jq to find words starting with # (not a good choice as i think it’s a reserved character) and then wrap them in a span, assign a class to those spans and then you can address them with CSS.

    I’ll push this to the js area.

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