Linked Questions
64 questions linked to/from Highlight a word with jQuery
4 votes
3 answers
2k views
find a specific word and wrap with a span tag [duplicate]
i am not sure the best way to go about this. here is the problem. i have a menu (list items) that has an irregular pattern of display. i cant alter the html directly as it is being spit out of a cms. ...
0 votes
1 answer
5k views
How to highlight words in html using jquery [duplicate]
Possible Duplicate: Highlight a word with jQuery I want to highlight certain words in html <body> tag, but I want to avoid highlighting those which are within <a> tag. How can this be ...
0 votes
1 answer
4k views
Highlight search text with jquery [duplicate]
I'm trying to implement a search for a table, I found an answer on the web and I tried it out, it works fine! now I want to highlight (change text colour: text colour class = blue-text) that search ...
-4 votes
1 answer
3k views
Search specific word in text and add class with jQuery [duplicate]
i have a text like this: <p>Hi this is a text and i wan't to add a class to some words which are here</p> And I wan't to add class ".red" to this words: "some","here","add", for example. ...
0 votes
2 answers
1k views
How to highlight in yellow a specific part of a string using jquery [duplicate]
I would like to know how to highlight in yellow only the plus sign (+) of a string using jQuery. For example: Text: Lorem ipsum dolor sit amet, consectetur adipiscing elit +
0 votes
0 answers
481 views
Javascript get the text visible on the display [duplicate]
I have a HTML page which is structured in two parts (div), a header and a container part in which some text is displayed. The text in the container part is large, and it is scrollable. I need to get ...
-1 votes
2 answers
59 views
Replace text with Javascript in any form it is written [duplicate]
I am using jQuery to find text in an html and highlight all occurrences of a text, replacing them for a span tag. <div>This a sample paragraph. Sample is it?</div> I am using the ...
2 votes
0 answers
34 views
Replacing a keyword inside html but excluding matches inside button, image and anchor tags [duplicate]
I am trying to replace all occurrences of a keyword inside an html document except those that are found inside a button, anchor or image tag. I have created a fiddle with the code that I am working ...
0 votes
0 answers
28 views
Highlight search word by adding span? [duplicate]
Currently try to highlight the "searched term" found in the "table" by putting the "results found" into a <span>. I get an error of "unexpected string" and with no results. Can some take a look ...
165 votes
28 answers
436k views
How to highlight text using javascript
Can someone help me with a javascript function that can highlight text on a web page. And the requirement is to - highlight only once, not like highlight all occurrences of the text as we do in case ...
36 votes
21 answers
154k views
Live search through table rows
I want to do a live search through the table rows, using jQuery, the "live" word is the key, because I want to type the keywords in the text input, on the same site and I'd like jQuery to ...
28 votes
14 answers
56k views
How to color specific word in a container using CSS
Suppose I have a container: <div id="container"> This is a red apple </div> How to color a word "red" with red color? Something like (pseudocode) #container:[word="red"]{ color:red; }...
7 votes
3 answers
12k views
Highlight word in HTML text (but not markup)
I'm trying to highlight all matching word inside the body but not words inside any html tag. For example the keyword given is 'para'. Here's the paragraph: <p class="para"> Example of paragraph....
14 votes
1 answer
19k views
How to highlight a part part of an Input text field in HTML using Javascript or JQuery
I'm performing some form of validation on a freely typed input text field in HTML. Is there a way to highlight certain words or phrases (based on certain criteria) in a input text field using JQuery ...
5 votes
6 answers
12k views
How can I color specific letters in html element text? [duplicate]
I have some span with some words in it, like <span id="phrase">Here are some words</span> I need to color all the 'e' characters red. I think of taking the span.innerText ...