I know $('.test').each(testFunction); invokes the testFunction for all matching .test elements on the page. How do I tell it to do just the first matching one.
I tried $('.test:first').each(testFunction); and it still seems to run for all of them.
:firstshould work as you expected http://jsfiddle.net/guard/r5nUZ/