Team:UNITN-Trento/JS/Extra
From 2013.igem.org
$(document).ready(function() { //Remove default click of .dot $(".dot").click(function(e) { e.preventDefault(); });
$(".spot").each(function() {
// Remove .spot default click
$(this).click(function(e) { e.preventDefault() });
//Change .dot content when mouseenter spot
$(this).mouseenter(function() {
id = $(this).attr('id');
var url = "", img = "", title = "", desc = "";
switch(id) {
case "spot1": {
url = "https://2013.igem.org/Team:UNITN-Trento/Attributions";
img = "";
title = "Attributions";
desc = "In this page you can find all the fantastic people that supported the team all over this summer, and also the masters (guru) of each part of the project.";
break;
}
case "spot2": {
url = "https://2013.igem.org/Team:UNITN-Trento/Extra/Fruit%20Info";
img = "";
title = "Fruit Info";
desc = "Some cute info about fruit that maybe you still don’t know! Check it out!";
break;
}
case "spot3": {
url = "https://2013.igem.org/Team:UNITN-Trento/Human_Practice";
img = "";
title = "Human Practice";
desc = "The team meets the people at the market, asking for opinions and suggestions about B. fruity!";
break;
}
case "spot4": {
url = "https://2013.igem.org/Team:UNITN-Trento/Safety";
img = "";
title = "Safety";
desc = "Synthetic biology is such an exciting subject but obviously the team considered how to improve the project to make it as safe as possible!";
break;
}
case "spot5": {
url = "https://2013.igem.org/Team:UNITN-Trento/Sponsor";
img = "";
title = "Sponsor";
desc = "Here are the people who made this project possible and who first believed in the team!";
break;
}
}
//Change dot link $(".dot").click(function(e) { document.location.href = url; }); $(".dot .circle").attr("src" , img); $(".dot .title").html(title); $(".dot .descr").html(desc); }); });
});