Home – Dreamcakes


Home – Dreamcakes = self.breakpoint) { if(self.isOpen){ self.closeMenu(); } $(‘#responsive-menu-pro, .responsive-menu-pro-submenu’).removeAttr(‘style’); } else { if($(‘.responsive-menu-pro-open’).length > 0){ self.setWrapperTranslate(); } } }); $(this.linkElement).on(‘click’, function(e) { self.smoothScrollToLocation(e); }); /* Desktop menu : hide on scroll down / show on scroll Up */ $(this.trigger).mousedown(function(e){ e.preventDefault(); e.stopPropagation(); }); if (jQuery(‘#responsive-menu-pro-button’).css(‘display’) != ‘none’) { $(‘#responsive-menu-pro-button,#responsive-menu-pro a.responsive-menu-pro-item-link,#responsive-menu-pro-wrapper input’).focus( function() { $(this).addClass(‘is-active’); $(‘html’).addClass(‘responsive-menu-pro-open’); $(‘#responsive-menu-pro li’).css({“opacity”: “1”, “margin-left”: “0”}); }); $(‘a,input,button’).focusout( function( event ) { if ( ! $(this).parents(‘#responsive-menu-pro-container’).length ) { $(‘html’).removeClass(‘responsive-menu-pro-open’); $(‘#responsive-menu-pro-button’).removeClass(‘is-active’); } }); } else { } $(‘#responsive-menu-pro a.responsive-menu-pro-item-link’).keydown(function(event) { if ( [13,27,32,35,36,37,38,39,40].indexOf( event.keyCode) == -1) { return; } var link = $(this); switch(event.keyCode) { case 13: link.click(); break; case 27: var dropdown = link.parent(‘li’).parents(‘.responsive-menu-pro-submenu’); if ( dropdown.length > 0 ) { dropdown.hide(); dropdown.prev().focus(); } break; case 32: var dropdown = link.parent(‘li’).find(‘.responsive-menu-pro-submenu’); if ( dropdown.length > 0 ) { dropdown.show(); dropdown.find(‘a, input, button, textarea’).filter(‘:visible’).first().focus(); } break; case 35: var dropdown = link.parent(‘li’).find(‘.responsive-menu-pro-submenu’); if ( dropdown.length > 0 ) { dropdown.hide(); } $(this).parents(‘#responsive-menu-pro’).find(‘a.responsive-menu-pro-item-link’).filter(‘:visible’).last().focus(); break; case 36: var dropdown = link.parent(‘li’).find(‘.responsive-menu-pro-submenu’); if( dropdown.length > 0 ) { dropdown.hide(); } $(this).parents(‘#responsive-menu-pro’).find(‘a.responsive-menu-pro-item-link’).filter(‘:visible’).first().focus(); break; case 37: event.preventDefault(); event.stopPropagation(); if ( link.parent(‘li’).prevAll(‘li’).filter(‘:visible’).first().length == 0) { link.parent(‘li’).nextAll(‘li’).filter(‘:visible’).last().find(‘a’).first().focus(); } else { link.parent(‘li’).prevAll(‘li’).filter(‘:visible’).first().find(‘a’).first().focus(); } if ( link.parent(‘li’).children(‘.responsive-menu-pro-submenu’).length ) { link.parent(‘li’).children(‘.responsive-menu-pro-submenu’).hide(); } break; case 38: var dropdown = link.parent(‘li’).find(‘.responsive-menu-pro-submenu’); if( dropdown.length > 0 ) { event.preventDefault(); event.stopPropagation(); dropdown.find(‘a, input, button, textarea’).filter(‘:visible’).first().focus(); } else { if ( link.parent(‘li’).prevAll(‘li’).filter(‘:visible’).first().length == 0) { link.parent(‘li’).nextAll(‘li’).filter(‘:visible’).last().find(‘a’).first().focus(); } else { link.parent(‘li’).prevAll(‘li’).filter(‘:visible’).first().find(‘a’).first().focus(); } } break; case 39: event.preventDefault(); event.stopPropagation(); if( link.parent(‘li’).nextAll(‘li’).filter(‘:visible’).first().length == 0) { link.parent(‘li’).prevAll(‘li’).filter(‘:visible’).last().find(‘a’).first().focus(); } else { link.parent(‘li’).nextAll(‘li’).filter(‘:visible’).first().find(‘a’).first().focus(); } if ( link.parent(‘li’).children(‘.responsive-menu-pro-submenu’).length ) { link.parent(‘li’).children(‘.responsive-menu-pro-submenu’).hide(); } break; case 40: var dropdown = link.parent(‘li’).find(‘.responsive-menu-pro-submenu’); if ( dropdown.length > 0 ) { event.preventDefault(); event.stopPropagation(); dropdown.find(‘a, input, button, textarea’).filter(‘:visible’).first().focus(); } else { if( link.parent(‘li’).nextAll(‘li’).filter(‘:visible’).first().length == 0) { link.parent(‘li’).prevAll(‘li’).filter(‘:visible’).last().find(‘a’).first().focus(); } else { link.parent(‘li’).nextAll(‘li’).filter(‘:visible’).first().find(‘a’).first().focus(); } } break; } }); } }; ResponsiveMenuPro.init(); }); ]]>

Source

Leave a Comment

Your email address will not be published. Required fields are marked *