... ... ... ... ...
You should be able to do this by extracting a slice of the array thus. It's the line
$("div[id='myDiv'] > a").slice(1,4).css("background","yellow");
that you're interested in. It will affect the 2nd, 3rd and 4th elements.
1 2 3 4 5 6 Click here