Team:ETH Zurich/collapsible

From 2013.igem.org

(Difference between revisions)
 
(One intermediate revision not shown)
Line 29: Line 29:
     strBefore = "collapse";
     strBefore = "collapse";
     str = "expand";
     str = "expand";
-
     if ($(this).children('div').html().indexOf("expand") >= 0)
+
     if ($(this).children('.collapsibleContainerTitle div').html().indexOf("expand") >= 0)
     {
     {
         str = [strBefore, strBefore = str][0];
         str = [strBefore, strBefore = str][0];
     }
     }
-
     $(this).text($(this).children('div').html().replace(strBefore, str));
+
     $(this).children('.collapsibleContainerTitle div').html($(this).children('.collapsibleContainerTitle div').html().replace(strBefore, str));
}
}
     $(document).ready(function() {
     $(document).ready(function() {

Latest revision as of 15:10, 25 October 2013