Can you put a variable inside the n-th child?

Can you put a variable inside the n-th child?

 I'm using the following to sequentially change the background color of some list items. It works, but is there a direct way of putting a variable inside the n-th child parentheses, instead of concatenating? Second question, more CSSey, though. The highlight goes all the way across the page since the CSS bounding box is 100% for the li items. The lines are various lengths so I can't just set the bounding box to, say, fifty percent. Is there a way to use jQuery to make the bounding box, or background color only go to the end of the text?

    
  1. var x = 1;
  2. jQuery(document).everyTime(2000,function(){
  3. jQuery("li:nth-child(" + x++ + ")").css("background-color","yellow"); },10);
  4. }
  5. );
jQuery(function(){