jaguarjs-jsdoc
jaguarjs-jsdoc copied to clipboard
Keep the order about a current class position
A Class that showed at current page will be shown by scrolling instead of changing order at navigation area.
I want it, too. And I suggest an appropriate modification to solve this issue. Modify main.js as follows:
32,44d31
< // Show an item related a current documentation automatically
< var filename = $('.page-title').data('filename').replace(/\.[a-z]+$/, '');
< var $currentItem = $('.navigation .item[data-name*="' + filename + '"]:eq(0)');
<
< if ($currentItem.length) {
< $currentItem
< .remove()
< .prependTo('.navigation .list')
< .show()
< .find('.itemMembers')
< .show();
< }
<
69c56,70
< });
---
>
> // Show an item related a current documentation automatically
> var filename = $('.page-title').data('filename').replace(/\.[a-z]+$/, '');
> var $linkItem = $('.navigation .item .title a[href="' + filename + '.html"]:eq(0)');
>
> if ($linkItem.length) {
> var $currentItem = $linkItem.parent().parent();
> $currentItem.find('.itemMembers').show();
>
> var $list = $('.navigation .list');
> var $firstItem = $list.find('.item:eq(0)');
> $list.scrollTop($currentItem.offset().top - $firstItem.offset().top);
> }
>
> });
+1 on this, it's really annoying to have the links redistributed on each click.