Hello, my name is Jan Jarfalk and I am an interaction designer and interface developer.

I’ve been working professionally with the web since 2002. Back then I had my own company and did everything myself. Now I am a bit more specific - I do usability, accessibility and a lot of client side coding. This, Unwrongest, is my personal lab. This is where I try, learn and evolve.

I am a Swedish citizen from Stockholm that currently lives and works in Sydney, Australia. From here I work for Getupdated's Stockholm based division 'Social Media', where we help our clients to create social networks.

I put function, before design. I love beautiful interfaces, but I like them simple and obvious. I like things that are fast and responsive. Take a look at my projects and I am certain you will notice and appreciate my slipstreamed approach.

Highlight is a simple Jquery plugin that highlights text phrases. It has been executed in this post to highlight ‘acknowledgment’, ‘matching’ and ‘class name’.

Highlight is a simple Jquery plugin that highlights text phrases. It does so by wrapping one or multiple phrases with a span with the class name “highlight”.

How to use Highlight

You can throw both a string or an array on Highlight. Have a look at the example below. The first row is going to highlight the word acknowledgment, the second row is going to highlight both ‘matching’ and ‘class name’. The code shown in the example below has been executed in this page.

	$('.body').highlight("acknowledgment");
	$('.body').highlight(["matching","class name"]);

What actually happens is that the matching phrases are wrapped inside a span element with the class name highlight. Therefor you will also need to add some css code to get a visual result.

.highlight { background: #ff0; }
Todo
Keyword Changes
Partiall links Highlight phrases partially inside an a element (link), In the current version; If a phrase is partially inside a html elemente it will not be highligted.

Acknowledgment

Johann Burkard The core is based on ideas presented in Johann Burkard’s Jquery plugin with the same name.

Comments

Make a comment