Kunena Menu
keyboard navigation
10 years 10 months ago #31692
by bens
keyboard navigation was created by bens
Hello,
I use MaximenuCk 8.0.20 on my joomla 3.4.7 site.
I want to add keyboard navigation to my menu.
In the older ver. i used some scripts to do it. the code:
jQuery(document).ready(function(){
jQuery(".level1").find('*').on('focus', function() {
jQuery(this).parents(".level0").addClass('sfhover');
jQuery(this).parents(".level0").css("background","rgba(168,205,241,.7)");
jQuery(this).parents(".floatCK").css("height","auto");
jQuery(this).parents(".floatCK").css("left","auto");
});
jQuery(".level1").find('*').on('blur', function() {
jQuery(this).parents(".level0").removeClass('sfhover');
jQuery(this).parents(".level0").css("background","");
});
});
But on the new ver. this code do not work anymore.
Is there an option to make the menu accessible with keyboard navigation?
thanks for your help
I use MaximenuCk 8.0.20 on my joomla 3.4.7 site.
I want to add keyboard navigation to my menu.
In the older ver. i used some scripts to do it. the code:
jQuery(document).ready(function(){
jQuery(".level1").find('*').on('focus', function() {
jQuery(this).parents(".level0").addClass('sfhover');
jQuery(this).parents(".level0").css("background","rgba(168,205,241,.7)");
jQuery(this).parents(".floatCK").css("height","auto");
jQuery(this).parents(".floatCK").css("left","auto");
});
jQuery(".level1").find('*').on('blur', function() {
jQuery(this).parents(".level0").removeClass('sfhover');
jQuery(this).parents(".level0").css("background","");
});
});
But on the new ver. this code do not work anymore.
Is there an option to make the menu accessible with keyboard navigation?
thanks for your help
Please Log in or Create an account to join the conversation.
10 years 10 months ago #31739
by ced1870
Joomlack Webmaster and Developer
Replied by ced1870 on topic keyboard navigation
Hi
the classes have changed, try something like this
CEd
the classes have changed, try something like this
Code:
jQuery(document).ready(function(){
jQuery(".level2").find('*').on('focus', function() {
jQuery(this).parents(".level1").addClass('sfhover');
jQuery(this).parents(".level1").css("background","rgba(168,205,241,.7)");
jQuery(this).parents(".floatck").css("height","auto");
jQuery(this).parents(".floatck").css("display","block");
});
jQuery(".level2").find('*').on('blur', function() {
jQuery(this).parents(".level1").removeClass('sfhover');
jQuery(this).parents(".level1").css("background","");
});
});
CEd
Joomlack Webmaster and Developer
Please Log in or Create an account to join the conversation.
10 years 10 months ago #31745
by bens
Replied by bens on topic keyboard navigation
Hi,
Thanks for the fast replay.
But it don`t work.
I use this code that does the trick:
jQuery(document).ready(function(){
jQuery(".level2").find("*").on('focus', function() {
jQuery(this).css({
'outline':'none',
'border':'1px solid #4D90FE',
'-webkit-box-shadow':' 0px 0px 4px 0px #4D90FE',
'box-shadow':' 0px 0px 4px 0px #4D90FE'
});
});
jQuery("*").on('blur', function() {
jQuery(this).css({
'outline':'none',
'border':'0px solid #4D90FE',
'-webkit-box-shadow':' 0px 0px 0px 0px #4D90FE',
'box-shadow':' 0px 0px 0px 0px #4D90FE'
});
});
jQuery(".maximenuckh").find("*").on('focus', function() {
jQuery(this).trigger('mouseenter');
});
jQuery(".maximenuckh").find("*").on('blur', function() {
jQuery(this).trigger('mouseleave');
});
)};
But i can`t set the backgraound on the parent when enterring the submenu.
U can add this to the moudle so everyone can use it.
Ben.
Thanks for the fast replay.
But it don`t work.
I use this code that does the trick:
jQuery(document).ready(function(){
jQuery(".level2").find("*").on('focus', function() {
jQuery(this).css({
'outline':'none',
'border':'1px solid #4D90FE',
'-webkit-box-shadow':' 0px 0px 4px 0px #4D90FE',
'box-shadow':' 0px 0px 4px 0px #4D90FE'
});
});
jQuery("*").on('blur', function() {
jQuery(this).css({
'outline':'none',
'border':'0px solid #4D90FE',
'-webkit-box-shadow':' 0px 0px 0px 0px #4D90FE',
'box-shadow':' 0px 0px 0px 0px #4D90FE'
});
});
jQuery(".maximenuckh").find("*").on('focus', function() {
jQuery(this).trigger('mouseenter');
});
jQuery(".maximenuckh").find("*").on('blur', function() {
jQuery(this).trigger('mouseleave');
});
)};
But i can`t set the backgraound on the parent when enterring the submenu.
U can add this to the moudle so everyone can use it.
Ben.
Please Log in or Create an account to join the conversation.
10 years 10 months ago #31749
by ced1870
Joomlack Webmaster and Developer
Replied by ced1870 on topic keyboard navigation
thank you for sharing this. Please remind me after christmas, I will look how to integrate this
CEd
CEd
Joomlack Webmaster and Developer
Please Log in or Create an account to join the conversation.
10 years 10 months ago #31752
by bens
Replied by bens on topic keyboard navigation
Will do 
thanks
thanks
Please Log in or Create an account to join the conversation.
Time to create page: 0.196 seconds




