0 5 min 3 weeks


CSA Shows { es.forEach(e => { o.unobserve(e.target); if (e.intersectionRatio > 0) { ex();o.disconnect();}else{ i++;if(fb.length>i){o.observe(fb[i])}} }) }); if (fb.length) { o.observe(fb[i]) } } }) ]]> li”).removeAttr(‘style’); this.isOpen = false; }, triggerMenu: function() { this.isOpen ? this.closeMenu() : this.openMenu(); }, triggerSubArrow: function(subarrow) { var sub_menu = $(subarrow).parent().siblings(‘.responsive-menu-pro-submenu’); var self = this; if(sub_menu.hasClass(‘responsive-menu-pro-submenu-open’)) { sub_menu.slideUp(self.subMenuTransitionTime, ‘linear’,function() { $(this).css(‘display’, ”); }).removeClass(‘responsive-menu-pro-submenu-open’); $(subarrow).html(this.inactiveArrow); $(subarrow).removeClass(‘responsive-menu-pro-subarrow-active’); } else { sub_menu.slideDown(self.subMenuTransitionTime, ‘linear’).addClass(‘responsive-menu-pro-submenu-open’); $(subarrow).html(this.activeArrow); $(subarrow).addClass(‘responsive-menu-pro-subarrow-active’); } }, menuHeight: function() { return $(this.container).height(); }, menuWidth: function() { return $(this.container).width(); }, wrapperHeight: function() { return $(this.wrapper).height(); }, setWrapperTranslate: function() { switch(‘left’) { case ‘left’: translate = ‘translateX(‘ + this.menuWidth() + ‘px)’; break; case ‘right’: translate = ‘translateX(-‘ + this.menuWidth() + ‘px)’; break; case ‘top’: translate = ‘translateY(‘ + this.wrapperHeight() + ‘px)’; break; case ‘bottom’: translate = ‘translateY(-‘ + this.menuHeight() + ‘px)’; break; } }, clearWrapperTranslate: function() { var self = this; }, init: function() { var self = this; $(this.trigger).on(‘click’, function(e){ e.stopPropagation(); self.triggerMenu(); }); $(this.trigger).mouseup(function(){ $(self.trigger).blur(); }); $(‘.responsive-menu-pro-subarrow’).on(‘click’, function(e) { e.preventDefault(); e.stopPropagation(); self.triggerSubArrow(this); }); $(window).resize(function() { if($(window).width() >= self.breakpoint) { if(self.isOpen){ self.closeMenu(); } $(‘#responsive-menu-pro, .responsive-menu-pro-submenu’).removeAttr(‘style’); } else { $(self.container).addClass(‘responsive-menu-pro-no-transition’); if($(‘.responsive-menu-pro-open’).length > 0){ self.setWrapperTranslate(); } } }); /* 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 li a.responsive-menu-pro-item-link’).focus( function() { if ( $(this).parent(‘li’).prev().children(‘.responsive-menu-pro-submenu’).length ) { $(this).parent(‘li’).prev().children(‘.responsive-menu-pro-submenu’).hide(); } else if ( $(this).parent(‘li’).next().children(‘.responsive-menu-pro-submenu’).length ) { $(this).parent(‘li’).next().children(‘.responsive-menu-pro-submenu’).hide(); } }); $(‘#responsive-menu-pro .responsive-menu-pro-submenu a.responsive-menu-pro-item-link’).focusout( function() { if ( $(this).is( $(‘#responsive-menu-pro .responsive-menu-pro-submenu a.responsive-menu-pro-item-link’).last() ) ) { $(this).parents(‘.responsive-menu-pro-submenu’).hide(); } }); } $(‘#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(); }); ]]> .wpv-pagination { *zoom: 1; }‘; wpvViewHead.appendChild( wpvViewExtraCss ); ]]>

Source