PageSourceSearch

https://angeldivers-bg.com/wp-content/plugins/wpsection/plugin/assets/frontend/hover_script.js?ver=1.0.0

js angeldivers-bg.com collected 2026-10-09 00:44:41 UTC 3,274 bytes, 98 lines download raw bytes

1
2//Folloing code is for Image Hover Effect 
3jQuery(document).ready(function($) {
4
5    // Add a class to the first image for styling purposes
6    $('.wps_singleproduct_details .cart-wrapper').addClass('wps_singleproduct_variation');
7
8}); 
9    
10    
11//Folloing code is for Image Hover Effect 
12jQuery(document).ready(function($) {
13
14    // Add a class to the first image for styling purposes
15    $('.woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:first-child').addClass('wps_thumb_gallery');
16
17    // Prevent lightbox or popup
18    $('.woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image a').on('click', function(e) {
19        e.preventDefault();
20    });
21
22    // Set clicked thumbnail image as featured image
23    $('.woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image a').on('click', function(e) {
24        e.preventDefault();
25
26        var newImageSrc = $(this).attr('href');
27        var mainImage = $('.woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:first-child img');
28
29        // Update the main image src and srcset attributes
30        mainImage.attr('src', newImageSrc);
31        mainImage.attr('srcset', newImageSrc);
32
33        // Ensure the image is not zoomed
34        // mainImage.css('transform', 'scale(1)');
35    });
36
37    // Handle hover effect in JavaScript
38    $('.wps_thumb_gallery')
39        .on('mouseover', function(){
40            $(this).find('img').css({'transform': 'scale('+ $(this).attr('data-scale') +')'});
41        })
42        
43        .on('mousemove', function(e){
44            var $img = $(this).find('img');
45            var containerWidth = $(this).width();
46            var containerHeight = $(this).height();
47            var mouseX = e.pageX - $(this).offset().left;
48            var mouseY = e.pageY - $(this).offset().top;
49            var transformOriginX = (mouseX / containerWidth) * 100;
50            var transformOriginY = (mouseY / containerHeight) * 100;
51            $img.css({'transform-origin': transformOriginX + '% ' + transformOriginY + '%'});
52        });
53
54    // Initialize the image setup
55    $('.wps_thumb_gallery').each(function(){
56        var $this = $(this);
57        var imgSrc = $this.find('img').attr('src');
58        $this.append('<div class="wps_thumb_gallery" style="background-image: url('+ imgSrc +');"></div>');
59    });
60
61});
62
63
64    jQuery(document).ready(function($) {
65    // Prevent lightbox or popup
66    $('.woocommerce-product-gallery__wrapper .woocommerce-product-gallery__thumbnails a').on('click', function(e) {
67        e.preventDefault();
68    });
69
70    // Set clicked thumbnail image as featured image
71    $('.woocommerce-product-gallery__wrapper .woocommerce-product-gallery__thumbnails a').on('click', function(e) {
72        e.preventDefault();
73
74        var newImageSrc = $(this).attr('href');
75        var mainImage = $('.woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image').first();
76
77        // Update the main image src and srcset attributes
78        mainImage.attr('src', newImageSrc);
79        mainImage.attr('srcset', newImageSrc);
80
81        // Ensure the image is not zoomed
82        mainImage.css('transform', 'scale(1)');
83    });
84});
85
86    
87//Above code is for Image Hover Effect 
88    
89    
90    
91
92
93
94    
95    
96
97
98

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.