On my WordPress website, I have a menu down one side and a embedded prezzie within an IFrame
next to the menu.
I want to use some form of click event to change the content of the IFrame
to another prezie without the page being refreshed, to give it a seamless change but I am stuck on how to write the code.
The menu buttons are actually pictures trapped in a map, to give the illusion they are actually functional buttons.
Can anyone help me with this please?
Thanks in advance.
Add a JavaScript function to swap the Url of the Prezi iframe.
Then add
onClick
handlers to your menu links/buttons to call thechangePrezi
function, passing in the proper Prezi key.Here is a Plunker Demo.