1(function ($) { 2 "use strict"; 3 4 function elementcamp_services_card($scope, $) { 5 $scope.find('.tcgelements-service-card.has-float-name').each(function() { 6 const serviceCard = this; // Native DOM element 7 const floatName = serviceCard.querySelector('.float-name'); 8 9 if (floatName) { 10 serviceCard.addEventListener('mouseenter', () => { 11 floatName.style.transform = 'scale(1)'; 12 floatName.style.opacity = '1'; 13 }); 14 15 serviceCard.addEventListener('mouseleave', () => { 16 floatName.style.transform = 'scale(0)'; 17 floatName.style.opacity = '0'; 18 }); 19 20 serviceCard.addEventListener('mousemove', (e) => { 21 const rect = serviceCard.getBoundingClientRect(); 22 const x = e.clientX - rect.left + 50; 23 const y = e.clientY - rect.top + 30; 24 floatName.style.left = `${x}px`; 25 floatName.style.top = `${y}px`; 26 floatName.style.transform = 'scale(1) translate(-50%, -50%)'; 27 }); 28 } 29 }); 30 } 31 32 $(window).on('elementor/frontend/init', function () { 33 elementorFrontend.hooks.addAction('frontend/element_ready/tcgelements-service-card.default', elementcamp_services_card); 34 }); 35 36})(jQuery);
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.