Why is my interval time is not get cleared?
<p>This is my function, I wrote this for moving my div from left to right. After <code>iter</code> reach 5, the interval has to stop. But now it is keep on running. My interval is not clearing, what is wrong with my function?</p>

<pre><code>var mydiv = document.getElementById('news-variety');
var iter = 0;
if (mydiv) {
    var columns = mydiv.getElementsByTagName('DIV');

    function animeColumn(index, col) {
        var timerID = window.setInterval(function () {
            var current = window.getComputedStyle(col);
            var matrix = new WebKitCSSMatrix(current.webkitTransform);
            col.style.webkitTransform = matrix.translate(10, 0);
            if (iter++ == 5) {
                window.clearInterval(timerID);
            }
        }, 50);
    }

    for (var i = 0; i &lt; columns.length; i++) {
        if (columns[i].className.toLowerCase() == "column") {
            columns[i];
            animeColumn(i, columns[i]);
        }
    }
}
</code></pre>
