Skip to content

Commit

Permalink
Merge pull request BSVino#121 from jacquesh/fix-category-auto-expand
Browse files Browse the repository at this point in the history
Fix the category auto-expand on page load
  • Loading branch information
BSVino authored Jul 31, 2022
2 parents 836ec3c + 61530f1 commit 120c975
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions html/copy/docs.gl.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,20 +222,12 @@ $(function() {

if ($.cookie("pagestyle") == 'dark')
$("#style_dark").click();

// hack to run after bonsai is initailized
setTimeout(function() {
$(".open_me").each(function() {
// copied from bonsai js to expand w/o animation
var listItem = $(this);
if( !listItem.data('subList') )
return;
listItem.addClass('expanded').removeClass('collapsed');
var subList = $(listItem.data('subList'));
subList.css('height', 'auto');
});
}, 1);


$(".open_me").each(function() {
var category_to_open = $(this);
var category_bonsai = $( "#command_categories" ).data('bonsai');
category_bonsai.expand(category_to_open);
});

search_fn = function(value) {
var version = 'all';
Expand Down

0 comments on commit 120c975

Please sign in to comment.