//MENU Version 3.0 //Bug fixes and added resize arrow buttons for the customizer //Below the onlclick open function for Sections, uncollapses if collapsed, switches to customize if in preview mode on small screens function wvrxSelectOptions(optionPanel) { jQuery('.accordion-section.current-panel').css('width', '300px'); // hack for Customizer's bad width calculation wp.customize.section(optionPanel).focus(); //Open the clicked section if (wvrxCM.wp_vers == '4.4') { jQuery('.accordion-section-content').css('margin-top', '0px'); // Hack for WP 4.4 (at least up to Beta 4) } jQuery('#wx-jumpmenu').css('display', 'none'); //Close the Menu jQuery('.accordion-section').css('width', ''); // clean the hack for Customizer's bad width calculation }; //Below the onlclick open function for Panels, uncollapses if collapsed, switches to customize if in preview mode on small screens function wvrxSelectPanel(tabPanel) { wp.customize.panel(tabPanel).focus(); //Open the clicked panel jQuery('#wx-jumpmenu').css('display', 'none'); //Close the Menu }; //Below the function to open jumpmenu on hover with a delay function wvrxjumpmenuOpen() { function wvrxOpen() { //Check if the mouse is still over when the delay expires if (jQuery('#wx-jump').is(":hover")) { jQuery('#wx-jumpmenu').css('display', 'block'); } } setTimeout(wvrxOpen, 500); }; function wvrxjumpmenuClose() { //For some weird reason, if we dont delay the close, the menu closes when we move from the button to the actual menu Probably a discontinuity issue in the hover function wvrxClose() { if (jQuery('#wx-jump').is(":hover") === false) { jQuery('#wx-jumpmenu').css('display', 'none'); } } setTimeout(wvrxClose, 700); } /* function wvrxRefresh() { alert('refresh'); wp.customize.preview.send( 'refresh' ); } \