Sparky2019

Sparky2019

Joined
Dec 19, 2019
Occupation
Code
Location
Wichita Falls, Texas

Activity Stream

Sparky2019 commented on a Page, Highlight Keywords on Page with jQuery  -  Dec 19, 2019

Sweet little piece of code!! I have already added it to my site. A slight problem I found during 'testing' though...

keywords = keywords.replace(/\W/g, ''); // removes any spaces
var str = keywords.split(" "); // uses spaces to split

If you want to separate the keywords string by finding 'spaces' (which is what the second line does), remove the first line.

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.