Commit 9a3a4f4a by Tom Giannattasio

set active accordion state

parent 5950520e
......@@ -13,9 +13,10 @@ class @Navigation
active: active
header: 'h3'
autoHeight: false
$('#accordion .ui-state-active').closest('.chapter').addClass('is-open')
$('#open_close_accordion a').click @toggle
$('#accordion').show()
$('#accordion a').click @setChapter
log: (event, ui) ->
log_event 'accordion',
......@@ -24,3 +25,8 @@ class @Navigation
toggle: ->
$('.course-wrapper').toggleClass('closed')
setChapter: ->
$('#accordion .is-open').removeClass('is-open')
$(this).closest('.chapter').addClass('is-open')
\ No newline at end of file
......@@ -75,6 +75,10 @@ section.course-index {
@include box-shadow(0 1px 0 #fff inset, 0 -1px 0 rgba(0, 0, 0, .1) inset);
@include transition(background-color .1s);
&.is-open {
background: #fff;
}
&:first-child {
border-radius: 3px 0 0 0;
}
......
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