Team:UNITN-Trento/JS/Main
From 2013.igem.org
(Difference between revisions)
Ggirelli (Talk | contribs)
(Created page with "/*Acts once the document is loaded*/ $(document).ready(function() { /*Move the tn-main-wrap as child of <body>*/ $("#tn-main-wrap").prependTo($("body")); - →Spoiler JS: $("....")
Newer edit →
(Created page with "/*Acts once the document is loaded*/ $(document).ready(function() { /*Move the tn-main-wrap as child of <body>*/ $("#tn-main-wrap").prependTo($("body")); - →Spoiler JS: $("....")
Newer edit →
Revision as of 09:10, 25 June 2013
/*Acts once the document is loaded*/ $(document).ready(function() { /*Move the tn-main-wrap as child of <body>*/ $("#tn-main-wrap").prependTo($("body"));
/*Spoiler JS*/ $(".tn-spoiler div").slideUp(); $(".tn-spoiler a").click(function(e) { e.preventDefault(); $(".tn-spoiler-active").removeClass("tn-spoiler-active"); $(this).parent().addClass("tn-spoiler-active"); $(".tn-spoiler").not(".tn-spoiler-active").children("div").slideUp(); $(".tn-spoiler-active").children("div").slideToggle(); }); });