Show/hide Multiple divs, and remember the has for each???

Show/hide Multiple divs, and remember the has for each???

I'm fairly new to js & jq, I have been working on this for hours now. I have been trying to get this to work, and got it half way. I know it is in my hash tag, but can't find any good help on split/join to remember both. I'll paste my js in a minute.

Here's what I am trying to do:
1- I have 2 or more divs that will show one tab, and hide all others (I have been trouble shooting just 2 divs for now).
2- Let's say div #1 has tab 4 of 5 selected, and div #2 has tab 3 of 4 selected.
3- When someone refreshes the page I wold like for the both these tabs to be remembered and show them both.

Right now it loads fine the first time, and allows me to select the tabs independently just fine. The issue arises when I hit refresh it only remembers the last clicked tab (the hash). My question is how would I combine this or get each hash recorded in the string to be remembered?

my code:
(function ($) {

    $.showHide1 = function (tabs, boxes)
    {
        function init() {
        var hash = window.location.hash;
        (!hash) ? hideShow('#' + $(boxes + ':first').attr('id')) : hideShow(window.location.hash);
        $(tabs).click(function (e) {
            e.preventDefault();
            var href = $(this).attr('href');
            window.location.hash = href;
            hideShow(href);
        });
    }
    function hideShow(el) {
        $(boxes).hide();
        $(el).show();
        $(tabs).removeClass('active');
        $('a[href="' + el + '"]').addClass('active');
        }
            init();
    };
   
    $.showHide2 = function (tabs, boxes)
    {
        function init() {
        var hash = window.location.hash;
        (!hash) ? hideShow('#' + $(boxes + ':first').attr('id')) : hideShow(window.location.hash);
        $(tabs).click(function (e) {
            e.preventDefault();
            var href = $(this).attr('href');
            window.location.hash = href;
            hideShow(href);
        });
    }
    function hideShow(el) {
        $(boxes).hide();
        $(el).show();
        $(tabs).removeClass('active');
        $('a[href="' + el + '"]').addClass('active');
        }
            init();
    };

})(jQuery);


Thanks in advance for this noob.