1

I am trying to create a rotating list of DOM object. I tried to run the application and for IE 8, the memory on the task manager is increasing but is returning to the same amount before animation. I tried to test using my Chrome 16.0.912.75 and I noticed that the memory just keeps on increasing every 10 seconds. Am I using the API correctly? When I do a remove() does it delete the actual dom object?

var rotateAnimationTime = 10000;
setTimeout(animateList, rotateAnimationTime);
function animateList() {

    // At least two items
    if ($('#divParent div.divRow').size() > 1) {

        var parentDiv = $('#divParent');
        // Clone the original item to be placed on bottom of list.
        var clonedDiv = $($('#divParent div.divRow').eq(0).clone());

        $('#divParent div.divRow').eq(0).fadeOut(itemFadeTime, 
            function(){ 
                $(this).remove();
                clonedDiv.appendTo(parentDiv).hide().fadeIn('slow');
                setTimeout(animateList, rotateAnimationTime);
            }
        );
    }
}
Nap
  • 8,096
  • 13
  • 74
  • 117

0 Answers0