e is null or not an object - recursive function IE8 only
Hi JQuery Forum...
I have an issue when running the following recursive function using jQuery. It was initially noticed on
http://duplos.org/ it has a recursive function for iterating through each "Bubble" and randomizing the new bg-position.
Simplified version (of code):
$(div.bounceBubbles').each(
function () {
$(this).css({backgroundPosition: '5px 5px'});
bounce(this);
}
);
function bounce(currentA) {
newx = Math.floor(10*Math.random());
newy = Math.floor(10*Math.random());
newspeed = bouncespeed + Math.floor(100*Math.random());
$(currentA).animate({backgroundPosition: newx + 'px ' + newy + 'px'}, newspeed, 'linear', function() { bounce(currentA);});
}
In Chrome and Firefox, there is no problems... figures.
My client would like it to run in IE8 the same, I have it doing just that, but after several hours the remaining js stops responding due to the null
e. The support stuff: using reference to
http://code.jquery.com/jquery-latest.min.js reference, running Win7 Business and IE8.
Can some jQuery guru please investigate this problem.
Thanks