Difference between revisions of "Template:Team:TU Eindhoven/Hexagon Script"
Jan Willem (Talk | contribs) |
|||
Line 20: | Line 20: | ||
for (j = 1; j <= amount; j++) { | for (j = 1; j <= amount; j++) { | ||
$('<div class="hexagon" id="hexagon' + j.toString() + '"></div>').appendTo($("#hexagonwrapper")); | $('<div class="hexagon" id="hexagon' + j.toString() + '"></div>').appendTo($("#hexagonwrapper")); | ||
− | $('<div class="hexagoncontentwrapper" id="hexagoncontentwrapper' + j.toString() + '" ><div class="hexagontext"><span class=" | + | $('<div class="hexagoncontentwrapper" id="hexagoncontentwrapper' + j.toString() + '" ><div class="hexagontext"><span class="tekst1B"> ' + title[j - 1] + '</span></div> <div class="hexagonimage"> <img class="hexagonlogos" src="https://static.igem.org/mediawiki/2015/' + image[j - 1] + '" /></div></div>').appendTo($("#hexagon" + j.toString())); |
for (i = 0; i < steps + 1; i++) { | for (i = 0; i < steps + 1; i++) { | ||
$("<a class='hexagonhitbox" + j.toString() + "' href='https://2015.igem.org/Team:TU_Eindhoven" + links[j - 1].toString() + "' >").appendTo("#hexagon" + j.toString()).css({ | $("<a class='hexagonhitbox" + j.toString() + "' href='https://2015.igem.org/Team:TU_Eindhoven" + links[j - 1].toString() + "' >").appendTo("#hexagon" + j.toString()).css({ |
Revision as of 12:48, 22 July 2015
var vergroot = 0; var steps = 13; var afknot = 50; var amount = 6; var radius = 170; var width = 270; var height = 0.5 * Math.sqrt(3) * width; var image = ['f/f0/TU_Eindhoven_menu_policypractice.png', '5/53/TU_Eindhoven_menu_collaborations.png', '1/14/TU_Eindhoven_menu_sponsors.png', 'b/bb/TU_Eindhoven_menu_home.png', '5/56/TU_Eindhoven_menu_team.png', '1/1a/TU_Eindhoven_menu_project.png']; var title = ['Policy Practices', 'Collaborations', 'Sponsors', 'Home', 'Team', 'Project']; var links = ['/Policy', '/Collaborations', '/Team/Sponsors', '', '/Team', '/Description']; $(document).ready(function() { //Hexagon for (j = 1; j <= amount; j++) { $('
').appendTo($("#hexagonwrapper")); $(' ' + title[j - 1] + '