plans: Ensure linked comparison tables scroll into view.

This commit is contained in:
Karl Stolley 2024-02-06 14:04:36 -05:00 committed by Tim Abbott
parent 960e29dc5a
commit 7ea313c658
1 changed files with 5 additions and 0 deletions

View File

@ -154,6 +154,11 @@ $(() => {
// table, but when it's present, make sure to align the
// comparison table with the current active plans tab
if ($comparison_table.length > 0) {
// Make sure that links coming from elsewhere scroll
// to the comparison table
if (target_hash.includes("plan-comparison")) {
document.querySelector(target_hash).scrollIntoView();
}
const plans_columns_count = tab_to_show.slice(1) === "self-hosted" ? 4 : 3;
// Set the correct values for span and colspan