Is there a quicker way of doing this:
function star1() { myFunction();jQuery('.star-position1').animate({"opacity":opacity},timeIn,function() { star1(); }); }
function star2() { myFunction();jQuery('.star-position2').animate({"opacity":opacity},timeIn,function() { star2(); }); }
and so on..
I’m then init these functions with
star1();
star2();
etc..
great if I could pass a number the number of stars I have and it generates the functions
1 Answer