// Вопрос // Вопрос-ответ не работает в Лисе

HTML

<div style="color:#FFF;" id="posts">
  <div id="dot_1" style="height: 10px"></div>
  <div id="dot_2" style="height: 10px"></div>
  <div id="dot_3" style="height: 10px"></div>
  <div id="end_posts"></div>
  <div id="read_more"></div>
</div>

JavaScript

var numline = 4;
window.onload = function() {
  for (var i = 1; i < (36 / 3); i++) {
    document.getElementById("posts").style.height = document.getElementById("dot_2").offsetTop + "px";
  }
}

function scroll() {
  if (numline < 36) {
    document.getElementById("posts").style.height = document.getElementById("dot_" + numline).offsetTop + "px";
  } else {
    document.getElementById("posts").style.height = document.getElementById("end_posts").offsetTop + "px";
    document.getElementById("read_more").innerHTML = "<a href='" + window.location.href + "/news/'>Открыть все новости</a>";
  }
  numline = numline + 2;
}