|
10 | 10 | var navgocoOptions = {
|
11 | 11 | caretHtml: '',
|
12 | 12 | accordion: false,
|
13 |
| - openClass: 'active--expand', // open |
14 |
| - save: false, // leave false or nav highlighting doesn't work right |
| 13 | + openClass: 'active--expand', |
| 14 | + save: false, |
15 | 15 | cookie: {
|
16 | 16 | name: 'navgoco',
|
17 | 17 | expires: false,
|
|
23 | 23 | }
|
24 | 24 | };
|
25 | 25 |
|
26 |
| - // when/if we decide to include this functionality in other versions, we can remove the conditional liquid statement |
27 |
| - // and migrate the contained code block to customscripts.js |
28 |
| - {% if page.version.version == 'v2.1' %} |
29 |
| - if ($(window).width() >= 992) { |
30 |
| - $('#mysidebar .tier-1').addClass('active--expand'); |
31 |
| - } |
32 |
| - |
33 |
| - $(window).on('resize', function() { |
34 |
| - if ($(window).width() > 992) { |
35 |
| - $('#mysidebar .tier-1>ul').slideDown(0); |
36 |
| - adjustMinHeight(); |
37 |
| - } else { |
38 |
| - $('#mysidebar .tier-1>ul').slideUp(0); |
39 |
| - } |
40 |
| - }); |
41 |
| - {% endif %} |
42 |
| - |
43 |
| - function adjustMinHeight(duration) { |
44 |
| - setTimeout(function() { |
45 |
| - var height = $sidebar.outerHeight(); |
46 |
| - if(height > 475) { |
47 |
| - $maincontent.animate({ 'min-height' : 625 + (height - 475) }, 200); |
48 |
| - $contentcol.css({ 'min-height' : 625 + (height - 475) }); |
49 |
| - } else { |
50 |
| - $maincontent.animate({ 'min-height' : 625 }, 200); |
51 |
| - $contentcol.css({ 'min-height' : 625 }); |
52 |
| - } |
53 |
| - }, 200); |
54 |
| - } |
| 26 | + $('#mysidebar .tier-1').addClass('active--expand'); |
55 | 27 |
|
56 | 28 | function closeVersionSwitcher() {
|
57 | 29 | $('#version-switcher .tier-1 ul').slideUp();
|
|
60 | 32 |
|
61 | 33 | $sidebar.navgoco($.extend(navgocoOptions, {
|
62 | 34 | onToggleAfter: function() {
|
63 |
| - adjustMinHeight(); |
64 | 35 | if ($(this.el).attr('id') == 'mysidebar' &&
|
65 | 36 | $('#version-switcher').hasClass('open')) {
|
66 | 37 | closeVersionSwitcher();
|
|
76 | 47 |
|
77 | 48 | $sidebar.show();
|
78 | 49 | $versionSwitcher.show();
|
79 |
| - adjustMinHeight(); |
80 | 50 | });
|
81 | 51 | </script>
|
82 | 52 |
|
|
0 commit comments