/* repsonsiveness js nodes */ var infoPicture = document.getElementById("info-section-picture"); var infoVarCol = document.getElementById("info-section-text-id"); var teamImage = document.getElementById("the-team-image"); var teamInfoCol = document.getElementById("team-info-col"); var processHeightJsNodes = []; var productDivs = document.getElementsByClassName("product-col"); /* when dom content loaded */ document.addEventListener("DOMContentLoaded", function(event) { // call the function called fContainerHeightFix fContainerHeightFix(); pictureHeightAdjust(); processHeightAdjust('blog-content', 'product-name'); document.body.class = ""; }); //js alternative to window onload, faster. works by queing the onload function function myLoadEvent(func) { // assign any pre-defined functions on 'window.onload' to a variable var oldOnLoad = window.onload; // if there is not any function hooked to it if (typeof window.onload != 'function') { // you can hook your function with it window.onload = func; } else { // someone already hooked a function window.onload = function () { // call the function hooked already oldOnLoad(); // call your awesome function func(); }; } } /* means that it dynamically adjusts the columns based on the number of products. max 4. rob asked for this on the front end. */ // myLoadEvent(function(){ // var prodLength = productDivs.length; // var bootstrapCol; // (12/productDivs.length <= 4)?bootstrapCol=4:bootstrapCol = 12/productDivs.length; // // for(i=0;i max) max=elements[x].clientHeight; } max = Math.ceil(max + 1); for (y = 0; y < elements.length; y++) { if(elements[y].clientHeight != max) elements[y].setAttribute("style","height:"+max+"px"); } } }