Picture of Dan Jonsson
data even
by Dan Jonsson - Friday, 16 September 2016, 10:44 AM
 

I want to expand the page menu drawer event to a special button.

How can I track what event is triggered?

It´s not enough with data-event="toggleDrawer" I need to fill the drawer with menu content like the progress indicator does!

 

Danne/

Picture of Tom Taylor
Re: data even
by Tom Taylor - Monday, 19 September 2016, 9:08 AM
 

You'll want to create a custom drawer plugin for this. Have a look at Resouces for a template (particularly L14-17).

Picture of Mike Stevens
Re: data even
by Mike Stevens - Monday, 19 September 2016, 1:31 PM
 

Hi the only way I know of doing that is a way that is not so pretty but simple to execute. If you feed the code below into the instruction input of the component this script will work. Ideally though I would include it within your theme, but for testing purposes the instructional input box will do...

<script>
$( document ).ready(function() {
$( "#drawerslide" ).on( "click", function() {
$( ".navigation-drawer-toggle-button" ).trigger( "click" );
$( ".resources-drawer" ).trigger( "click" );
});
});
</script>

<div class="recipe"><button id="drawerslide" style="font-size: 150% !important;">Open drawer</button></div>

 

Picture of Dan Jonsson
Re: data even
by Dan Jonsson - Wednesday, 21 September 2016, 12:48 PM
 

Sorry, but what do you mean with 'instruction input'?

 

In this case I need to modify the navigation in the module.

 

D