tbody display:none with a if condition (Jquery)

tbody display:none with a if condition (Jquery)

Hi,

I want to show columns A,B,C if X === North America (accessing a mobile app) or show D,E,F,G if X ===Europe. Both columns will bring data. What is the way to perform this? Should I create the code for North America and Europe in the same index.htm and show/hide depends on the result of X or is there a better division of files I could do? 

I have seen tbody display:none could be a good solution for my requirement, but not sure how I could implement it using a if condition. Examples are welcome.

Thank you.