set active accordion state
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user