Server IP : 10.107.20.4  /  Your IP : 216.73.217.92
Web Server : Apache
System : Linux webm004.cluster107.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 : simfexinjt ( 803937)
PHP Version : 7.1.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/simfexinjt/../s/../simfexinjt/dev/../dev/../www/wp-content/themes/simflex/js/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/simfexinjt/../s/../simfexinjt/dev/../dev/../www/wp-content/themes/simflex/js/scripts.js
(function ($, root, undefined) {
	
	$(function () {
		
		'use strict';
		
		// DOM ready, take it away

        //$mobile: max-width 639px;
        //$tablette: 640px 1023px;
        //$small-desktop: 1024px 1279px;
        //$desktop: 1280px;

        $('.sliding-panel-button,.sliding-panel-fade-screen,.sliding-panel-close').on('click touchstart',function (e) {
            $('.sliding-panel-content,.sliding-panel-fade-screen').toggleClass('is-visible');
            e.preventDefault();
        });

        $('.hidden-number').each(function(){
           var texte = $(this).html();

           if (document.documentElement.lang == "en-GB"){
                $(this).html('Display number');
           } else {
                $(this).html('Afficher le n°');
           }
           
           $(this).data('number', texte);
        });

        $('.hidden-number').click(function(){
            $(this).html($(this).data('number'));
        });

        function hiddenPanel(){

            function hiddenThis(element){
                if($(element).is(':hidden'))
                    $(element).parent().css('margin-bottom', 0);
                else
                    $(element).parent().css('margin-bottom', 30);
            }

            $('.hidden-desktop').each(function(){
                hiddenThis(this);
            });

            $('.hidden-small-desktop').each(function(){
                hiddenThis(this);
            });

            $('.hidden-tablette').each(function(){
                hiddenThis(this);
            });

            $('.hidden-mobile').each(function(){
                hiddenThis(this);
            });

        }


        /* ---
         |  Aligne la taille vertical de la listes des éléments produits purs et produits régénérés
         --- */
        function egalizeProductListItem(){
            var eHeight, oHeight, elE, elO;
            $( ".productlist-gallery-item").each(function( index ) {
                if (index % 2 === 0) {
                    elE = $(this).find('.item-list-products');
                    eHeight = elE.height() + 1;
                }
                else {
                    elO = $(this).find('.item-list-products');
                    oHeight = elO.height() - 1;
                }

                if (eHeight > 0 && oHeight > 0) {
                    if (eHeight > oHeight) {
                        elO.height(eHeight)
                    } else {
                        elE.height(oHeight)
                    }
                    eHeight = 0;
                    oHeight = 0;
                }

            });
        }

        function checkAndAddClass(oldElement, newElement, classe){
            $(oldElement).removeClass(classe);
            $(newElement).addClass(classe);
        }

        $(document).ready(function() {
            egalizeProductListItem();
            hiddenPanel();
        });
        $(window).resize(function(){
            egalizeProductListItem();
            hiddenPanel();
        });

        $('.letter').click(function(){
            var href;
            if (!$(this).hasClass('active')){
                checkAndAddClass('.letter', this, 'active');
                href = $(this).attr('href');
                checkAndAddClass('.productlist-gallery-item', href, 'active');
            }
        });

		
	});
	
})(jQuery, this);