After receiving assistance from members oka and Mike Robinson, I have successfully created two tables for users to interact with using tabs and dropdowns.
Both tables have the same structure and feature a dropdown menu to show/hide columns. Users can select a choice from the dropdown in one table and then switch over to the other table to compare choices.
Everything seems to be working well, except for one issue - when switching tables, the correct column ('.target') is displayed, but the dropdown resets to its default option. This discrepancy might confuse viewers as the displayed columns do not match the selected choice in the dropdown.
The code is able to remember which choices were hidden and which target was shown, but the dropdown selection does not reflect this behavior. Any thoughts on what could be causing this?
Below are the snippets of jquery, css, html that I am using: