Team:ETH Zurich/project/overview

From 2014.igem.org

(Difference between revisions)
Line 10: Line 10:
     $("text").on("click", function(){
     $("text").on("click", function(){
       var ID = $(this).attr("name");
       var ID = $(this).attr("name");
-
      var value = $(this).text();
 
       $(this).text(function(i, text){
       $(this).text(function(i, text){
           return text === "Complexify" ? "Simplify" : "Complexify";
           return text === "Complexify" ? "Simplify" : "Complexify";
       })
       })
-
         $("article."+ID+".complex").replaceWith(function(){
+
         $("article."+ID+".complex").fadeToggle("1500");
-
         return value === "Complexify" ? $("article."+ID+".complex").html()  : $("article."+ID+".simple").html()
+
         $("article."+ID+".simple").fadeToggle("1500");
-
        });
+
     });
     });
     $("polygon").on("click", function(){
     $("polygon").on("click", function(){
       var ID = $(this).next().attr("name");
       var ID = $(this).next().attr("name");
-
      var value = $(this).next().text();
 
       $(this).next().text(function(i, text){
       $(this).next().text(function(i, text){
           return text === "Complexify" ? "Simplify" : "Complexify";
           return text === "Complexify" ? "Simplify" : "Complexify";
       })
       })
-
         $("article."+ID+".complex").replaceWith(function(){
+
         $("article."+ID+".complex").fadeToggle("1500");
-
         return value === "Complexify" ? $("article."+ID+".complex").html()  : $("article."+ID+".simple").html()
+
         $("article."+ID+".simple").fadeToggle("1500");
-
        });
+
     });
     });
});
});

Revision as of 15:43, 3 September 2014

iGEM ETH Zurich 2014