title: Trying to use a variable in jQuery Nth-child
body: <p>I know there's one or two similar questions on here but the answers provided don't solve my problem. 
  I am creating a random number, then I want to highlight a particular element that is the nth-child (using that random number)</p>
  
  <p>Here is the code, it works if I use a regular number but highlights every child if I use the variable.</p>
  
  <pre><code>c = $(".slideList li").length;
  rn = Math.floor(Math.random() * c);
  $('.slideList &gt; li:nth-child(" + rn + ")').addClass('on');
  $('.testBoxesContain &gt; div:nth-child(" + rn + ")').fadeIn();
  </code></pre>