1jQuery(document).ready(function($) { 2 window.moveTooltip = function() { 3 var tooltips = $('.aec-info-tooltip'); 4 if (tooltips.length > 1) { 5 tooltips.not(':first').remove(); 6 } 7 8 var targetLabel = $('label[for="shipping_method_0_local_pickup77"]'); 9 10 if (targetLabel.length) { 11 // Mover el tooltip junto al label 12 $('.aec-info-tooltip').appendTo(targetLabel); 13 14 // Asegurarse de que el tooltip sea visible 15 $('.aec-info-tooltip').show(); 16 } 17 } 18 19 // Ejecutar la función inicial 20 setTimeout(moveTooltip, 10); 21 // moveTooltip(); 22 23 // Observar cambios en el DOM para casos donde el contenido se carga dinámicamente 24 // var observer = new MutationObserver(function(mutations) { 25 // moveTooltip(); 26 // }); 27 28 // Configurar el observer 29 // observer.observe(document.body, { 30 // childList: true, 31 // subtree: true 32 // }); 33 34 // También ejecutar cuando cambian los métodos de envÃo 35 $(document.body).on('updated_checkout updated_shipping_method updated_cart_totals updated_wc_div', function() { 36 setTimeout(moveTooltip, 20); 37 }); 38});
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.