Team:EPF-Lausanne/Template/script.js
From 2012.igem.org
(Difference between revisions)
(Created page with "//Generate private namespace var EPFL = (function(){ return { setup: function(){ EPFL.setupProtocols(); }, setupProtocols: function(){ $(".protocol-title").each(func...") |
|||
Line 21: | Line 21: | ||
}()); | }()); | ||
- | + | runOnloadHook = function(){ | |
EPFL.setup(); | EPFL.setup(); | ||
}; | }; |
Revision as of 21:27, 4 June 2012
//Generate private namespace var EPFL = (function(){ return { setup: function(){ EPFL.setupProtocols(); }, setupProtocols: function(){ $(".protocol-title").each(function(){ var link = $("<a>").attr("href", "#").click(function(){ $(this).parent().parent().children().last().toggle() return false; }); var children = $(this).children(); $(this).empty(); link.append(children); $(this).append(link); }); $(".protocol-inner-box").hide(); } }; }());
runOnloadHook = function(){ EPFL.setup(); };