I have sharepoint online and I am trying to create a script that takes webparts on a page and puts them into tabs. The solution doesn't need to be dynamic. I asked another question on this, and got a good start, but I am confused on why it isn't working/ where to go from here. My current code is as follows:
As I understand it, the above code should hide the two webparts in the 'Tabs' array, then when it loads it shows the first webpart. When a tab is clicked, the other tab's webpart is hidden and the new one should be shown.
This code is not working, and I am wondering if it is because I am not moving the webparts. I hide/show them but I don't add them as children to the tab's zones. If that is the fix, I'm not quite sure how to go about it.