How can i keep .hide() / .show() running when i refresh page use js

How can i keep .hide() / .show() running when i refresh page use js
0

This is my code

$(document).ready(function () {
   
    $("#btnFinish").click(function () { FINISH_BUMPER_UNPACKING(); });
    $("#btnBack").click(function () { BACK_BUMPER_UNPACKING(); });
    $("#btnconfirm1").click(function () {
        PT_TRD_LIST_CONFIRM1();
        $("#btnconfirm1").hide();
        EndFLASH(flash_Trd);
        $(flash_Trd).hide();
    });
    $("#btnFinish1").click(function () {
        PT_TRD_LIST_FINISH1();
        $("#btnconfirm1").show();

    });
    $("#btnconfirm2").click(function () {
        PT_TRD_LIST_CONFIRM2()
        $("#btnconfirm2").hide();

        EndFLASH(flash_Trd);
        $(flash_Trd).hide();
    });
    $("#btnFinish2").click(function () {
        PT_TRD_LIST_FINISH2();
        $("#btnconfirm2").show();

    });
});

I don’t understand when i refresh page all event will be remove

You could maybe use local storage to save the show/hide state and have jQuery respond to those local storage variables.

Not at a computer to offer better examples, but local storage is pretty straightforward if you check the docs for it.

Thanks u so much! I got it