Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7173217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:46:40+00:00 2026-05-28T15:46:40+00:00

This is my first post, but I’ve loved using this site as resource for

  • 0

This is my first post, but I’ve loved using this site as resource for quite awhile now. However, the time has now come for me to ask a question…

I have found plenty of JavaScript highlighter plugins during my research into this question, but they all focus on finding one word. For a fan-site I am creating (Mega Man Battle Network, for those interested), I would like to find a way to detect the words, “Fire”, “Aqua”, “Elec”, and “Wood”, so I can automatically add styling to them.

Any JavaScript gurus out there to help me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T15:46:42+00:00Added an answer on May 28, 2026 at 3:46 pm

    I figured it out!

    $(document).ready(function(){
        $('div.elemental:contains("Aqua")').addClass('aqua');
        $('div.elemental:contains("Fire")').addClass('fire');
        $('div.elemental:contains("Wood")').addClass('wood');
        $('div.elemental:contains("Elec")').addClass('elec');
    });
    

    Now I just need to figure out how create a callback to a new function so that the highlighting is done to each new page I go to.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first post, but I've been using the site for years. However,
This is my first post, but I have been using this site for a
This is my first post here, but I've using this site regularly to help
this is my first post on this website, but I'm all the time getting
this is my first post to stackoverflow, but I've used this amazing site before.
this is my first post here. I'm using an existing Flash widget but would
This is my first post, I'm new to this site, but I've been lurking
This is my first post, but this question has racked my brain and Google's
This is my first post and I'm quite a novice on C++ and compiling
Well, this is my first post here and really enjoying the site. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.