Team:ETH Zurich/collapsible

From 2013.igem.org

(Difference between revisions)
 
(5 intermediate revisions not shown)
Line 29: Line 29:
     strBefore = "collapse";
     strBefore = "collapse";
     str = "expand";
     str = "expand";
-
     if ($(".collapsibleContainerContent", $(this).parent()).title.indexOf("expand") >= 0)
+
     if ($(this).children('.collapsibleContainerTitle div').html().indexOf("expand") >= 0)
     {
     {
         str = [strBefore, strBefore = str][0];
         str = [strBefore, strBefore = str][0];
     }
     }
-
     $(".collapsibleContainerContent", $(this).parent()).title($(".collapsibleContainerContent", $(this).parent()).title.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