Closed rajgoel closed 4 years ago
Hi Asvin,
I updated this plugin to work with the new plugin API in Reveal v4. To get access to the menu plugin from within your presentation you'll need to use Reveal.getPlugin('menu') in place of RevealMenu (as you would have previously done).
My presentations use the following...
<script>
toggleMenu = () => {
let menu = Reveal.getPlugin('menu');
if (menu) menu.toggle();
};
</script>
<a href="#" onclick="toggleMenu(); return false;">Menu</a>
I clearly forgot to update the docs for this when I updated. I'll make an effort to do this soon. Thanks for catching it.
Excellent, thanks!
Hi Greg, I'm in the process of updating my plugins and demos to reveal.js 4 and noticed that I cannot use
RevealMenu.toggle()
as desribed in #35. You can reproduce the issue, e.g., here.Can it be that the
toggle
function is no longer exposed? Or am I doing something wrong?Cheers Asvin