Clear data & display another on button click Datatable

Well as you haven’t shown any html one can only guess at a solution.
I assume you have one data show element and have two buttons.
I don’t do jQuery so if I was wanting to change the displayed data using two buttons I think the easiest way would be to have two container elements(divs with ids of display_A and display_B) Their contents would be identical.
The display elements and a button. The buttons ids would be btn_A and btn_B.
Initially display_B would be hidden
Clicking btn_A would hide display_A, remove the hide from display_B and fill in the display_B data.

thanks @dennisjn, i found the way to fix my problem and already fixed it