HEX
Server: Apache
System: Linux webd004.cluster130.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User: frenchy (106757)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/frenchy/refonte2023/wordpress/wp-content/plugins/ova-portfolio/assets/js/script-elementor.js
(function($){
	"use strict";

	$(window).on('elementor/frontend/init', function () {

        elementorFrontend.hooks.addAction('frontend/element_ready/ova_por_slide.default', function(){

            var owlsl       = $('.ova_por_slider .owl-carousel');
            var dataOps     = $('.ova_por_slider').attr('data-option');
            var owlsl_ops   = JSON.parse( dataOps );

            if ( $('body').hasClass('rtl') ) {
                owlsl_ops.rtl = true;
            }

            owlsl.owlCarousel({
                nav:false,
                margin: owlsl_ops.margin,
                items: owlsl_ops.items,
                loop: owlsl_ops.loop,
                autoplay: owlsl_ops.autoplay,
                autoplayTimeout: owlsl_ops.autoplayTimeout,
                dots: owlsl_ops.dots,
                autoplayHoverPause: owlsl_ops.autoplayHoverPause,
                slideBy: owlsl_ops.slideBy,
                smartSpeed: owlsl_ops.smartSpeed,
                rtl: owlsl_ops.rtl,
                responsive: {
                    0: {
                        items: 1,
                    },
                    600: {
                        items: 2,
                    },
                    768: {
                        items: 2,
                    },
                    1200: {
                        items: owlsl_ops.items,
                    }
                }
            });

            /* Fixed WCAG */
            owlsl.find(".owl-nav button.owl-prev").attr("title", "Previous");
            owlsl.find(".owl-nav button.owl-next").attr("title", "Next");
            owlsl.find(".owl-dots button").attr("title", "Dots");

        });



        elementorFrontend.hooks.addAction('frontend/element_ready/ova_por_slide_2.default', function(){

            var owlsl       = $('.ova_por_slider_2 .owl-carousel');
            var dataOps     = $('.ova_por_slider_2').attr('data-option');
            var owlsl_ops   = JSON.parse( dataOps );

            if ( $('body').hasClass('rtl') ) {
                owlsl_ops.rtl = true;
            }

            owlsl.owlCarousel({
                nav:false,
                margin: owlsl_ops.margin,
                items: owlsl_ops.items,
                loop: owlsl_ops.loop,
                autoplay: owlsl_ops.autoplay,
                autoplayTimeout: owlsl_ops.autoplayTimeout,
                dots: owlsl_ops.dots,
                autoplayHoverPause: owlsl_ops.autoplayHoverPause,
                slideBy: owlsl_ops.slideBy,
                smartSpeed: owlsl_ops.smartSpeed,
                rtl: owlsl_ops.rtl,
                responsive: {
                    0: {
                        items: 1,
                    },
                    768: {
                        items: 2,
                    },
                    1024: {
                        items: 3,
                    },
                    1200: {
                        items: owlsl_ops.items,
                    },
                }
            });

            /* Fixed WCAG */
            owlsl.find(".owl-nav button.owl-prev").attr("title", "Previous");
            owlsl.find(".owl-nav button.owl-next").attr("title", "Next");
            owlsl.find(".owl-dots button").attr("title", "Dots");

        });

        elementorFrontend.hooks.addAction('frontend/element_ready/ova_por_gallery.default', function(){
            $('.ova-por-gallery').each( function() {

                $('.ova-por-gallery .icon').on("click",function(){
                    var gallery = JSON.parse( $(this).attr("data-gallery") );
                    new Fancybox(gallery,{
                        'scrolling': 'no',
                        'speedIn': 600, 
                        'speedOut': 200, 
                        'overlayShow' : false,
                        caption: function (fancybox, carousel, slide) {
                            return (
                                `${slide.index + 1} / ${carousel.slides.length} <br />` + slide.caption
                            );
                        },
                    });
                });

            });
        });
    });
})(jQuery);