title: Javascript modulo operation in IE7
body: <p>For adding a class to every third item in a List I am using a modulo operation like this:</p>
  
  <pre><code>var projectElements = document.getElementById("projectList").children;
  var iCount = 0;
  for (var i in projectElements) {
      iCount++;
      if (iCount % 3 == 0) {
          if (projectElements[i].className == "") {
              projectElements[i].className += "projectLinkLast";
          }
          else {
              projectElements[i].className += " projectLinkLast";
          }
      }
  }
  </code></pre>
  
  <p>It works fine in Firefox and other browsers except for Internet Explorer 7.
  Does anybody have a clue why?</p>