Is there a way to highlight specific words or numbers without inserting a span tag?
Posted
by Taylor
on Stack Overflow
See other posts from Stack Overflow
or by Taylor
Published on 2010-04-27T21:11:14Z
Indexed on
2010/04/27
21:13 UTC
Read the original article
Hit count: 212
jQuery
|jquery-selectors
I've got blocks of text with various specs in them and want to have jquery highlight whatever matches a specific pattern without inserting any extra html.
The following is the kind of text that I've got to work with.
Intel® Core™ i7 Processor 920 (2.66GHz, 8MB cache, 4.8GT/sec)/ Genuine Windows® 7 Home Premium 64bit- English/ 640 GB Serial ATA non Raid (7200 Rpm)/ 6GB 1333MHz (3x2GB) Tri Channel Memory/ Display Not Included/ 16X DVD+/- RW Optical Drive (DVD & CD read and write)/ 1.8GB NVIDIA® GeForce™ GTX260 graphics card/ Integrated HDA 7.1 Dolby Digital Audio
What I'm hoping jquery can do is highlight some of the basic specs without inserting any extra html. Maybe working off a list of values matching the spec format using some wildcards where neededed?
The css to select the correct
tag is #list div div div+p or I could just give the p class but would rather not.
Is this kind of thing possible?
© Stack Overflow or respective owner