Show container outside of nested tab based on tab clicked

Using the nested tabs element we want to unhide/display a container which resides outside of the nested tab element. So clicking a tab the user should see the corresponding pane, and in addition a specific container above the nested tabs element.

How can I solve that (using the Nestable Elements API)?

You could do this with bricks-interactions + a attribute on your container/section and some custom javascript function.

it would look something like that:


function myToggleFunction(object) {
  const source = object.source;
  const target = object.target;

  console.log(source);
  console.log(target);
}

Now you can write a javascript function that manipulates the target, when the source is pressed and you can check if the source was already open, so you don’t close the target, when the source was clicked twice.

Of course you need to make sure the attribute [hidden] isn’t displayed and remove the whole attribute if it should be displayed.

Hope this helps
Cheers Suat