-
https://issuu.com/tsjak/docs/tsjak_2_november_2017 <script> var links = [ "//e.issuu.com/embed.html#2622280/13606028", "//e.issuu.com/embed.html#2622280/7308786", "//e.issuu.com/embed.html#2622280/7308769", "//e.issuu.com/embed.html#2622280/7308800", "//e.issuu.com/embed.html#2622280/7308818", "//e.issuu.com/embed.html#2622280/4392083", "//e.issuu.com/embed.html#2622280/4477894", "//e.issuu.com/embed.html#2622280/4478114", "//e.issuu.com/embed.html#2622280/4478144", "//e.issuu.com/embed.html#2622280/4478176", "//e.issuu.com/embed.html#2622280/4478215" ]; $( document ).ready(function() { var columns = 2; //make sure that 12 is dividable by this number (otherwise bootstrap is kicking your ass) var spansize = Math.floor(12/columns); var preLink = "<iframe width=\"100%\" height=\"373\" src=\""; var postLink = "\" frameborder=\"0\" allowfullscreen></iframe>"; var appendingString = ""; for(i=0;i<links.length;i++){ if(i%columns == 0){ appendingString += "<div class=\"row\">"; } appendingString += "<div class=\"span"+spansize+"\">"; appendingString += preLink + links[i] + postLink; appendingString += "</div>"; if(i+1%columns == 0){ appendingString += "</div>"; } } if (links.length%columns!=0){ appendingString += "</div>" ; } $( "#tsjaks" ).append( appendingString ); }); </script> <div id="tsjaks"> </div>