Team:UNITN-Trento/JS/About us
From 2013.igem.org
(Created page with "$(document).ready(function() { //Remove default click of .dot $(".dot").click(function(e) { e.preventDefault(); }); $(".spot").each(function() { // Remove .spot defaul...") |
(Corrected switch syntax (forgot 'case')) |
||
Line 14: | Line 14: | ||
var url = "", img = "", title = "", desc = ""; | var url = "", img = "", title = "", desc = ""; | ||
switch(id) { | switch(id) { | ||
- | + | case "spot1": { | |
url = "https://2013.igem.org/Team:UNITN-Trento/Team"; | url = "https://2013.igem.org/Team:UNITN-Trento/Team"; | ||
img = "https://static.igem.org/mediawiki/2013/a/a6/Tn-2013-tour_circle-Home-edition.png"; | img = "https://static.igem.org/mediawiki/2013/a/a6/Tn-2013-tour_circle-Home-edition.png"; | ||
Line 22: | Line 22: | ||
} | } | ||
- | + | case "spot2": { | |
url = "https://igem.org/Team.cgi?year=2013&team_name=UNITN-Trento"; | url = "https://igem.org/Team.cgi?year=2013&team_name=UNITN-Trento"; | ||
img = "https://static.igem.org/mediawiki/2013/3/3d/Tn-2013-tour_circle-Vending-machine.png"; | img = "https://static.igem.org/mediawiki/2013/3/3d/Tn-2013-tour_circle-Vending-machine.png"; | ||
Line 30: | Line 30: | ||
} | } | ||
- | + | case "spot3": { | |
url = "https://2013.igem.org/Team:UNITN-Trento/Gallery"; | url = "https://2013.igem.org/Team:UNITN-Trento/Gallery"; | ||
img = "https://static.igem.org/mediawiki/2013/a/a6/Tn-2013-tour_circle-Home-edition.png"; | img = "https://static.igem.org/mediawiki/2013/a/a6/Tn-2013-tour_circle-Home-edition.png"; | ||
Line 38: | Line 38: | ||
} | } | ||
- | + | case "spot4": { | |
url = "https://2013.igem.org/Team:UNITN-Trento/Notebook"; | url = "https://2013.igem.org/Team:UNITN-Trento/Notebook"; | ||
img = "https://static.igem.org/mediawiki/2013/3/3d/Tn-2013-tour_circle-Vending-machine.png"; | img = "https://static.igem.org/mediawiki/2013/3/3d/Tn-2013-tour_circle-Vending-machine.png"; | ||
Line 46: | Line 46: | ||
} | } | ||
- | + | case "spot5": { | |
url = "https://2013.igem.org/Team:UNITN-Trento/Protocols"; | url = "https://2013.igem.org/Team:UNITN-Trento/Protocols"; | ||
img = "https://static.igem.org/mediawiki/2013/a/a6/Tn-2013-tour_circle-Home-edition.png"; | img = "https://static.igem.org/mediawiki/2013/a/a6/Tn-2013-tour_circle-Home-edition.png"; | ||
Line 54: | Line 54: | ||
} | } | ||
- | + | case "spot6": { | |
url = "https://2013.igem.org/Team:UNITN-Trento/Laboratory/Meetings"; | url = "https://2013.igem.org/Team:UNITN-Trento/Laboratory/Meetings"; | ||
img = "https://static.igem.org/mediawiki/2013/3/3d/Tn-2013-tour_circle-Vending-machine.png"; | img = "https://static.igem.org/mediawiki/2013/3/3d/Tn-2013-tour_circle-Vending-machine.png"; |
Revision as of 08:33, 23 September 2013
$(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/Team";
img = "";
title = "FruiTeam";
desc = "In the FruiTeam page you can find the most obscure secrets of the Team: their best skills, the failures that happened in these months and much, much more.";
break;
}
case "spot2": {
url = "https://igem.org/Team.cgi?year=2013&team_name=UNITN-Trento";
img = "";
title = "Official Profile";
desc = "The official Team page of iGEM UNITN-Trento 2013.";
break;
}
case "spot3": {
url = "https://2013.igem.org/Team:UNITN-Trento/Gallery";
img = "";
title = "Gallery";
desc = "Photo of our life in these months in the lab and during the free time.";
break;
}
case "spot4": {
url = "https://2013.igem.org/Team:UNITN-Trento/Notebook";
img = "";
title = "Notebook";
desc = "Description day-to-day of the laboratory work. You can select posts by data, person and tag. Also the filters can be combined!";
break;
}
case "spot5": {
url = "https://2013.igem.org/Team:UNITN-Trento/Protocols";
img = "";
title = "Protocols";
desc = "Here you can find the list of protocols that were used to obtain all successful results of our project.";
break;
}
case "spot6": {
url = "https://2013.igem.org/Team:UNITN-Trento/Laboratory/Meetings";
img = "";
title = "Meetings";
desc = "The story of the birth of the B. fruity project and the beginning of the the 'Fellowship of the Fruit'";
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); }); });
});