Team:ETH Zurich/collapsible
From 2013.igem.org
(Difference between revisions)
Line 29: | Line 29: | ||
strBefore = "collapse"; | strBefore = "collapse"; | ||
str = "expand"; | str = "expand"; | ||
- | if ($(this).children().text().indexOf("expand") >= 0) | + | if ($(this).children('div').text().indexOf("expand") >= 0) |
{ | { | ||
str = [strBefore, strBefore = str][0]; | str = [strBefore, strBefore = str][0]; | ||
} | } | ||
- | $(this).text($(this).children().text().replace(strBefore, str)); | + | $(this).text($(this).children('div').text().replace(strBefore, str)); |
} | } | ||
$(document).ready(function() { | $(document).ready(function() { |
Revision as of 15:04, 25 October 2013