Open tree when there's an anchor

This commit is contained in:
Fernando Blat
2017-01-19 11:15:42 +01:00
parent 3bb77b7536
commit 6970a8f72c

View File

@@ -30,3 +30,9 @@ App.TreeNavigator =
elem.removeClass('closed').addClass('open')
elem.siblings('ul').show()
if anchor = $(location).attr('hash')
if link = elem.find('a[href="'+anchor+'"]')
link.parents('ul').each ->
$(this).show()
$(this).siblings('span').removeClass('closed').addClass('open')