Merge pull request #744 from MITx/bug/tomg/collapsible-hint
Bug/tomg/collapsible hint
This commit is contained in:
@@ -98,6 +98,7 @@ section.tool-wrapper {
|
||||
display: block;
|
||||
float: right;
|
||||
font: bold 14px $body-font-family;
|
||||
margin-top: 19px;
|
||||
|
||||
&:active {
|
||||
@include box-shadow(none);
|
||||
@@ -130,6 +131,7 @@ section.tool-wrapper {
|
||||
margin: 0;
|
||||
text-shadow: 0 -1px 0 darken(#073642, 10%);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
color: #839496;
|
||||
}
|
||||
|
||||
ul {
|
||||
@@ -205,6 +207,7 @@ section.tool-wrapper {
|
||||
font-weight: bold;
|
||||
@include inline-block();
|
||||
margin: 0 lh(.5) lh() 0;
|
||||
color: #839496;
|
||||
text-shadow: 0 -1px 0 darken(#073642, 10%);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,14 @@ div.course-wrapper {
|
||||
margin-bottom: 15px;
|
||||
padding: 0 0 15px;
|
||||
|
||||
.collapsible {
|
||||
header {
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
header {
|
||||
@extend h1.top-header;
|
||||
@include border-radius(0 4px 0 0);
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
|
||||
<%block name="js_extra">
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var collapsibleSet;
|
||||
|
||||
$(function(){
|
||||
// this should be brought back into problems
|
||||
$('.longform').hide();
|
||||
@@ -47,12 +49,16 @@
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.collapsible section').hide()
|
||||
$('.collapsible header a').click(function() {
|
||||
$(this).parent().siblings().slideToggle();
|
||||
$(this).parent().parent().toggleClass('open');
|
||||
return false
|
||||
});
|
||||
if(!collapsibleSet) {
|
||||
collapsibleSet = true;
|
||||
$('.collapsible section').hide();
|
||||
$('.collapsible header a').bind('click', toggleHint);
|
||||
function toggleHint(e) {
|
||||
$(this).parent().siblings().slideToggle();
|
||||
$(this).parent().parent().toggleClass('open');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</%block>
|
||||
|
||||
Reference in New Issue
Block a user