Template:Team:TU Eindhoven/Timeline Script

$(document).ready(function() { for ( index = 1; index <= 11; index++){ $("

").appendTo("#timeline").css({'float':'left','width':'97px','height':'30px'}); } $(".timeBlock").hover(function(){ showEvent( $(this).attr('id').match(/\d+/) ) },function(){ }); }); function showEvent(idnr) { var color = '#' + idnr.toString() + '1' + idnr.toString() + '1' + idnr.toString() + '1'; $("#event").css({'background-color':color}) }