You are always passing in true to the toggleMethod, so it will always "show" the table.
I would create a global variable that you can flip inside the toggle method instead.
Alternatively you can check the visibility state of the table instead of an explicit variable