I have this javascript:
$('.foto').filter(function(index) {
return index == Math.floor(Math.random() * 8) + 1;
}).trigger('mouseover');
I want to simulate a hover effect on a photo, but somehow the filter function does not work. I also tried
$('.foto:random').trigger('mouseover');