Template:Team:Edinburgh/Code

From 2013.igem.org

(Difference between revisions)
Line 419: Line 419:
$(function() {
$(function() {
-
$("#flags").children("img").css("cursor", "pointer");
+
$("#flags img").css("cursor", "pointer");
-
$("#flags").children("img").css("cursor", "hand");
+
$("#flags img").css("cursor", "hand");
$("#languages").children("div").css("display", "none"); $("#english").css("display", "block");
$("#languages").children("div").css("display", "none"); $("#english").css("display", "block");
-
     var english = $("#flags").children("img")[0];
+
     var english = $("#flags img")[0];
     if(english) english.onclick=function() {$("#languages").children("div").css("display", "none"); $("#english").css("display", "block")};
     if(english) english.onclick=function() {$("#languages").children("div").css("display", "none"); $("#english").css("display", "block")};
-
     var french= $("#flags").children("img")[1];
+
     var french= $("#flags img")[1];
     if(french) french.onclick=function() {$("#languages").children("div").css("display", "none"); $("#french").css("display", "block")};
     if(french) french.onclick=function() {$("#languages").children("div").css("display", "none"); $("#french").css("display", "block")};
-
     var chinese = $("#flags").children("img")[2];
+
     var chinese = $("#flags img")[2];
     if(chinese ) chinese .onclick=function() {$("#languages").children("div").css("display", "none"); $("#chinese ").css("display", "block")};
     if(chinese ) chinese .onclick=function() {$("#languages").children("div").css("display", "none"); $("#chinese ").css("display", "block")};
-
   var polish = $("#flags").children("img")[3];
+
   var polish = $("#flags img")[3];
     if(polish ) polish .onclick=function() {$("#languages").children("div").css("display", "none"); $("#polish ").css("display", "block")};
     if(polish ) polish .onclick=function() {$("#languages").children("div").css("display", "none"); $("#polish ").css("display", "block")};
-
     var lithuanian= $("#flags").children("img")[4];
+
     var lithuanian= $("#flags img")[4];
     if(lithuanian) lithuanian.onclick=function() {$("#languages").children("div").css("display", "none"); $("#lithuanian").css("display", "block")};
     if(lithuanian) lithuanian.onclick=function() {$("#languages").children("div").css("display", "none"); $("#lithuanian").css("display", "block")};
-
   var bulgarian = $("#flags").children("img")[5];
+
   var bulgarian = $("#flags img")[5];
     if(bulgarian ) bulgarian .onclick=function() {$("#languages").children("div").css("display", "none"); $("#bulgarian ").css("display", "block")};
     if(bulgarian ) bulgarian .onclick=function() {$("#languages").children("div").css("display", "none"); $("#bulgarian ").css("display", "block")};

Revision as of 10:27, 4 October 2013