Commit b799d9b7 by Calen Pennington

Merge pull request #744 from MITx/bug/tomg/collapsible-hint

Bug/tomg/collapsible hint
parents 1a06efc5 4af134b2
...@@ -98,6 +98,7 @@ section.tool-wrapper { ...@@ -98,6 +98,7 @@ section.tool-wrapper {
display: block; display: block;
float: right; float: right;
font: bold 14px $body-font-family; font: bold 14px $body-font-family;
margin-top: 19px;
&:active { &:active {
@include box-shadow(none); @include box-shadow(none);
...@@ -130,6 +131,7 @@ section.tool-wrapper { ...@@ -130,6 +131,7 @@ section.tool-wrapper {
margin: 0; margin: 0;
text-shadow: 0 -1px 0 darken(#073642, 10%); text-shadow: 0 -1px 0 darken(#073642, 10%);
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
color: #839496;
} }
ul { ul {
...@@ -205,6 +207,7 @@ section.tool-wrapper { ...@@ -205,6 +207,7 @@ section.tool-wrapper {
font-weight: bold; font-weight: bold;
@include inline-block(); @include inline-block();
margin: 0 lh(.5) lh() 0; margin: 0 lh(.5) lh() 0;
color: #839496;
text-shadow: 0 -1px 0 darken(#073642, 10%); text-shadow: 0 -1px 0 darken(#073642, 10%);
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
} }
......
...@@ -52,6 +52,14 @@ div.course-wrapper { ...@@ -52,6 +52,14 @@ div.course-wrapper {
margin-bottom: 15px; margin-bottom: 15px;
padding: 0 0 15px; padding: 0 0 15px;
.collapsible {
header {
margin-bottom: 0;
padding-bottom: 0;
font-size: 16px;
}
}
header { header {
@extend h1.top-header; @extend h1.top-header;
@include border-radius(0 4px 0 0); @include border-radius(0 4px 0 0);
......
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
<%block name="js_extra"> <%block name="js_extra">
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
var collapsibleSet;
$(function(){ $(function(){
// this should be brought back into problems // this should be brought back into problems
$('.longform').hide(); $('.longform').hide();
...@@ -47,12 +49,16 @@ ...@@ -47,12 +49,16 @@
return false; return false;
}); });
$('.collapsible section').hide() if(!collapsibleSet) {
$('.collapsible header a').click(function() { collapsibleSet = true;
$(this).parent().siblings().slideToggle(); $('.collapsible section').hide();
$(this).parent().parent().toggleClass('open'); $('.collapsible header a').bind('click', toggleHint);
return false function toggleHint(e) {
}); $(this).parent().siblings().slideToggle();
$(this).parent().parent().toggleClass('open');
return false;
}
}
}); });
</script> </script>
</%block> </%block>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment