Is it possible to open the main menu using p:hotkey?
Regards,
BTJ
Opening menu using hotkey
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
I think you want to open or close main menu. Right? not submenu?
Which menu position are you using? Popup or Inline
Which menu position are you using? Popup or Inline
Github Profile: https://github.com/mertsincan
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
For PopUp Menu, I think you can try the following steps;
Then add p:hotkeys;
it works fine for me.
Code: Select all
var Volt = {
init: function() {
....
},
....
close: function(){ /* Please ADD */
this.menuButton.removeClass('active-menu');
this.menuWrapper.removeClass('active-menu');
},
open: function() { /* Please ADD */
this.menuButton.addClass('active-menu');
this.menuWrapper.addClass('active-menu');
}
}
Code: Select all
<p:hotkey bind="up" handler="Volt.close();" /> /* Up arrow key*/
<p:hotkey bind="down" handler="Volt.open();" /> /* Down arrow key */
Github Profile: https://github.com/mertsincan
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Ok, thanks
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest