OK so here's the code I have thus far.
var h = document.getElementById("main").offsetHeight;
document.getElementById("sidebar1").style.height = h + "px";
It works in a standard layout, but I also need the height to readjust when the screen size changes the layout for example, going from portrait to landscape on a tablet or in a scenario where infinite scroll is involved, the sidebar height should increase I scroll down the page.
Any ideas?
Thanks