Multiple Embeds & links to show

#1

I would like to have 4 code embeds one page and access them by clicking a link to show one at a time?
Can anyone help with code for this?

0 Likes

#2

Hi @barryoptimail,

You can do this one of two ways:

  1. You can just make four separate embeds and put them in whatever tab view you would already be using.
  2. You can make one embed, and use the associated set setSource method of the notebook to change it’s contents whenever someone clicks on the corresponding link. You can read more about how to do this here: https://runkit.com/docs/embed

Let me know if you need any more help!

Thanks,

Francisco

0 Likes