1(function () { 2 'use strict'; 3 4 function resetOceanWpCustomSelect( select ) { 5 if ( ! select ) { 6 return; 7 } 8 9 if ( select.nextElementSibling && select.nextElementSibling.classList.contains( 'theme-select' ) ) { 10 select.nextElementSibling.remove(); 11 } 12 13 select.classList.remove( 'hasCustomSelect' ); 14 select.classList.remove( 'theme-selectHover' ); 15 16 select.style.opacity = ''; 17 select.style.position = ''; 18 select.style.height = ''; 19 select.style.fontSize = ''; 20 select.style.appearance = ''; 21 select.style.width = ''; 22 } 23 24 function resetJetWooBuilderSelects( context ) { 25 var scope = context || document; 26 var selects = scope.querySelectorAll( '.elementor-jet-single-add-to-cart .variations_form .variations select' ); 27 28 if ( ! selects.length ) { 29 return; 30 } 31 32 selects.forEach( function( select ) { 33 resetOceanWpCustomSelect( select ); 34 } ); 35 } 36 37 function initJetWooBuilderOceanWpFix() { 38 resetJetWooBuilderSelects(); 39 40 if ( 'undefined' !== typeof jQuery ) { 41 jQuery( document ).on( 'wc_variation_form', function( event ) { 42 resetJetWooBuilderSelects( event.target ); 43 } ); 44 } 45 } 46 47 if ( document.readyState === 'loading' ) { 48 document.addEventListener( 'DOMContentLoaded', initJetWooBuilderOceanWpFix ); 49 } else { 50 initJetWooBuilderOceanWpFix(); 51 } 52 53 if ( 'undefined' !== typeof elementorFrontend ) { 54 jQuery( window ).on( 'elementor/frontend/init', function() { 55 elementorFrontend.hooks.addAction( 56 'frontend/element_ready/jet-single-add-to-cart.default', 57 function( $scope ) { 58 resetJetWooBuilderSelects( $scope[0] ); 59 } 60 ); 61 } ); 62 } 63})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.