Template:Team:Edinburgh/Code

From 2013.igem.org

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

Revision as of 20:08, 3 October 2013