`; $('#subtotal').parent().after(iconContainer); const self = this; // 인쇄 이벤트 바인딩 (모바일에서는 CSS가 숨겨집니다) $('#print-cart-btn').on('click', function() { self.printCart.call(self); }); $('#copy-cart-btn').on('click', function() { self.copyCartAsBulletList.call(self); }); }; LabDOSApp.originalRenderCart = LabDOSApp.renderCart; LabDOSApp.renderCart = function(highlightItemName = null) { this.originalRenderCart.call(this, highlightItemName); this.addCartIcons.call(this); }; $(document).ready(function() { setTimeout(function() { if (LabDOSApp && typeof LabDOSApp.addCartIcons === 'function') { LabDOSApp.addCartIcons.call(LabDOSApp); } }, 1000); // 새로 추가: labdos-inview 클래스 토글 및 고정 검색 상자 처리 (function(){ var rootEl = document.getElementById('lab-dos'); if (!rootEl) return; function setInView(inView){ document.body.classList.toggle('labdos-inview', !!inView); console.log('labdos-inview:', inView); // 디버그 } function recompute() { var rect = rootEl.getBoundingClientRect(); var vpH = window.innerHeight || document.documentElement.clientHeight; // 중요한 부분인 경우 뷰에 포함되는 것으로 간주 #lab-dos가 보이는 경우 var inView = rect.bottom > vpH * 0.2 && rect.top < vpH * 0.8; setInView(inView); } if ('IntersectionObserver' in window) { try { var io = new IntersectionObserver(function(entries){ entries.forEach(function(entry){ setInView(entry.isIntersecting); }); }, { threshold: [0, 0.01], rootMargin: '0px 0px -30% 0px' }); io.observe(rootEl); } catch(e) { /* 스크롤 검사로 대체 */ } } $(window).on('scroll.labdos resize.labdos orientationchange.labdos', recompute); setTimeout(recompute, 100); })(); // 공격적인 접근 방식을 사용하여 모바일에서 고정 검색 상자를 강제로 적용 (function(){ console.log('고정 검색 상자 초기화 중'); // 디버그 var $searchBox = $('#lab-dos .search-box'); var $searchWrapper = $('#lab-dos .search-wrapper'); console.log('찾은 요소:', $searchBox.length, $searchWrapper.length); // 디버그 if (!$searchBox.length || !$searchWrapper.length) return; var stickyClone = null; var isStuck = false; function handleSticky() { var isMobile = window.innerWidth <= 991; if (!isMobile) { if (isStuck) unstickSearchBox(); return; } if (!document.body.classList.contains('labdos-inview')) { if (isStuck) unstickSearchBox(); return; } var searchRect = $searchBox[0].getBoundingClientRect(); var shouldStick = searchRect.top <= 60; console.log('고정 검색 확인:', { shouldStick, searchTop: searchRect.top, isStuck }); // 디버그 if (shouldStick && !isStuck) { stickSearchBox(); } else if (!shouldStick && isStuck) { unstickSearchBox(); } } function stickSearchBox() { if (isStuck) return; isStuck = true; console.log('고정 검색 상자 활성화 중'); // 디버그 // 간단한 앵커 스타일 고정 검색 상자 생성 stickyClone = $(''); stickyClone.html(`
탭하여 검사 결과를 검색하세요...
`); stickyClone.css({ position: 'fixed', top: '60px', left: '15px', right: '15px', height: '50px', zIndex: '99999', backgroundColor: 'rgba(255, 255, 255, 0.95)', backdropFilter: 'blur(15px)', webkitBackdropFilter: 'blur(15px)', border: '1px solid rgba(255, 76, 136, 0.2)', boxShadow: '0 8px 32px rgba(255, 76, 136, 0.15)', borderRadius: '16px', cursor: 'pointer', display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#6a297a', fontSize: '16px', fontWeight: '500' }); // 클릭 시 원래 검색으로 스크롤하고 포커스를 맞춥니다. stickyClone.on('click', function(){ $('html, body').animate({ scrollTop: Math.max(0, $searchBox.offset().top - 100) }, 400, function(){ $searchBox.find('#searchBox').focus(); }); }); $('body').append(stickyClone); // 간격 추가 $searchWrapper.css('paddingTop', '70px'); } function unstickSearchBox() { if (!isStuck) return; isStuck = false; console.log('고정 검색 상자 비활성화 중'); // 디버그 if (stickyClone) { stickyClone.remove(); stickyClone = null; } $searchWrapper.css('paddingTop', ''); } $(window).on('scroll.sticky resize.sticky orientationchange.sticky', handleSticky); setTimeout(handleSticky, 500); })(); // 페이지 로드 시 지우기(×) 버튼 표시 초기화 var $sb = $('#searchBox'); $sb.closest('.search-box').toggleClass('has-value', ($sb.val() || '').trim().length > 0); // 10초 후, Gravity Form(id=3)을 플레이스홀더로 이동시키고 표시합니다. setTimeout(function() { var $placeholder = $('#gravityform-placeholder'); if (!$placeholder.length) return; var $gf = $('#gform_wrapper_3'); if (!$gf.length) { $gf = $('#gform_3').closest('.gform_wrapper'); } if (!$gf.length) { $gf = $('.gform_wrapper').filter(function(){ return $(this).find('#gform_3').length > 0; }).first(); } if ($gf.length) { $gf.hide(); $placeholder.append($gf); $gf.fadeIn(300); } }, 10000); // 사용자가 양식/섹션과 상호 작용할 때만 Google Maps API를 지연 로드합니다. (function(){ var mapsSrc = null; var mapsInjected = false; function captureAndRemoveMapsScript() { if (window.google && window.google.maps) { mapsInjected = true; // 이미 로드됨 return; } var $scripts = $('script[src*="maps.googleapis.com/maps/api/js"]'); if ($scripts.length) { mapsSrc = $scripts.eq(0).attr('src'); // 즉시 로드를 방지하기 위해 일치하는 모든 스크립트 제거 $scripts.remove(); } } function injectMapsScriptOnce() { if (mapsInjected) return; mapsInjected = true; if (!mapsSrc) return; var s = document.createElement('script'); s.src = mapsSrc; s.async = true; s.defer = true; document.head.appendChild(s); } // 스크립트 태그를 최대한 빨리 캡처하려고 시도합니다. captureAndRemoveMapsScript(); // 결제 섹션 또는 폼 내부의 입력 필드와의 상호 작용 시 로드합니다. var interactionEvents = 'click focus touchstart change'; $(document).on(interactionEvents, '#checkout-section, #gform_wrapper_3, #gform_3, #gravityform-placeholder', function(){ injectMapsScriptOnce(); }); // 섹션이 뷰포트 근처에 있을 때 로드합니다. if ('IntersectionObserver' in window) { var observer = new IntersectionObserver(function(entries){ entries.forEach(function(entry){ if (entry.isIntersecting) { injectMapsScriptOnce(); observer.disconnect(); } }); }, { rootMargin: '200px' }); var el = document.getElementById('checkout-section'); if (el) 관찰자.observe(el); } })(); }); })(jQuery);
MedEx는 매우 효율적이었고 제 메시지에 빠르게 답장해 주었습니다. 검사 결과는 매우 자세하고 최종 보고서에 잘 정리되어 있었습니다. 의사 선생님이 화상 통화로 모든 검사 결과를 자세히 설명해 주셨습니다. MedEx와의 경험은 미국에서 많은 전문의를 만나본 경험 중 가장 좋았습니다. 감사합니다!