sclass HDivWithVerticalExpandButton { int initialHeight; S expandButtonText = "Read more"; O contents; *(int *initialHeight, O *contents) {} S html() { ret div(contents, class := "expandable", style := "padding: 20px 10px; height: " + initialHeight + "px; overflow: hidden;") + hbutton(expandButtonText, onclick := [[ $(this).prev('.expandable').css('height', 'inherit'); $(this).hide(); ]]); } bool needsJQuery() { true; } }