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)

Here is the code, it works if I use a regular number but highlights every child if I use the variable.

```
c = $(".slideList li").length;
rn = Math.floor(Math.random() * c);
$('.slideList > li:nth-child(" + rn + ")').addClass('on');
$('.testBoxesContain > div:nth-child(" + rn + ")').fadeIn();

```