I can't get the rand variable to work in this code below:
$(document).ready(function() {
var rand = Math.floor((Math.random() * 10) + 1);
$('.related1').load('inc/related.asp .list:eq(1)');
$('.related2').load('inc/related.asp .list:eq(2)');
$('.related3').load('inc/related.asp .list:eq(rand)');
});
The first 2 load fine, but the one using the random number does not.
I also saw a suggestion and tried:
$('.related3').load('inc/related.asp .list:eq("+rand+")');
But that didn't work either. Any ideas? Thanks in advance!