adds conditional so that jquery only runs when divs are rendered