Difference between revisions of "Template:Team:TU Eindhoven/Hexagon Script"
Jan Willem (Talk | contribs) |
Jan Willem (Talk | contribs) |
||
Line 81: | Line 81: | ||
$("#hexagon" + id).css('transition', 'transform 0.5s'); | $("#hexagon" + id).css('transition', 'transform 0.5s'); | ||
$("#hexagon" + id).css('transform', 'rotate(' + (360 / amount * (id - 1) - 30).toString() + 'deg)'); | $("#hexagon" + id).css('transform', 'rotate(' + (360 / amount * (id - 1) - 30).toString() + 'deg)'); | ||
+ | $("#hexagon" + id).css('transform', 'matrix(0.707106781186548, 0.707106781186548, -0.707106781186548, 0.707106781186548, 114.042181669766, 114.042181669766)'); | ||
$("#hexagon" + id).css('z-index', 50); | $("#hexagon" + id).css('z-index', 50); | ||
vergroot = 1; | vergroot = 1; |
Revision as of 16:23, 14 September 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 = ['/Practices', '/Collaborations', '/Team/Sponsors', '', '/Team', '/Description']; $(document).ready(function() { //Hexagon for (j = 1; j <= amount; j++) { $('
').appendTo($("#hexagonwrapper")); $(' ' + title[j - 1] + '