https://t.me/RX1948
Server : Apache/2.4.18 (Ubuntu)
System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64
User : oppastar ( 1041)
PHP Version : 7.0.33-0ubuntu0.16.04.15
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Directory :  /var/www/kanvakanva.com/public_html/assets/frontend_new/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/kanvakanva.com/public_html/assets/frontend_new/js/functions.js
(function($) {
    /* ---------------------------------------------
      Mega menu width
    --------------------------------------------- */
    var megaWidth = $('.container').width() - 30;
    $('.header .mega-menu').width(megaWidth);
    var navWidth = $('.header .b-trend-nav').width();
    $('.header .mega-menu-li').hover(function() {
        var megaLeft = $(this).position().left;
        $(this).children('.header .mega-menu').css({
            'left': '-' + (megaLeft + navWidth / 4 - 7) + 'px'
        });
        $(this).children('.header .mega-menu').addClass('show-mega');
    }, function() {
        $(this).children('.header .mega-menu').removeClass('show-mega');
    });

    /*----------------------------------
    Search nav top 
    ------------------------------------*/
    $('.show-nav-search').click(function() {
        $('.in-nav-search').show();
    });
    $(document).mouseup(function(e) {
        var container = $(".in-nav-search");
        if (!container.is(e.target) // if the target of the click isn't the container...
            &&
            container.has(e.target).length === 0) // ... nor a descendant of the container
        {
            container.hide();
        }
    });

    /*-------------------------------------
    Mini cart showing
    --------------------------------------*/
    /* ---------------------------------------------
     Owl carousel
    --------------------------------------------- */
    //custom slider1
    function jqUpdateSize(){
        // Get the dimensions of the viewport
        var widthBody = $('body').width();
        var widthContainer = $('.container').width();                
        var stagePaddingSlider = (widthBody - widthContainer) / 2;        
        $('.lage-carousel').owlCarousel({
            stagePadding: stagePaddingSlider,
            loop: true,
            margin: 60,
            autoplay: true,
            autoPlaySpeed: 6000,
            autoPlayTimeout: 5000,
            autoplayHoverPause: true,
            lazyLoad: true,
            lazyContent: true,
            nav: true,
            dots: true,
            responsive: {
                0: {
                    items: 1
                },
                600: {
                    items: 1
                },
                1000: {
                    items: 1
                },
                1200: {
                    items: 1
                }
            }
        });    

        var slideEl = $('.slider-style1 .owl-carousel .owl-item'),
            oldStyle = slideEl.attr('style'),
            style = 'width: ' + widthContainer + 'px !important; margin-right: 60px';

        slideEl.attr('style', style);

        $('.slider-style1 .owl-controls .owl-next').css({
            'right': + (stagePaddingSlider - 23) + 'px'
        });
        $('.slider-style1 .owl-controls .owl-prev').css({
            'left': + (stagePaddingSlider - 13) + 'px'
        });
        $('.slider-style1 .owl-dots').width(widthContainer);
        $('.slider-style1 .owl-dots').css({
            'left': + (stagePaddingSlider) + 'px'
        });        
        /*hover cart*/
        var heightImg = $('.product-wrap img').height();    
        $(".button-hover").css({
            'bottom': 'calc(100% - ' + (heightImg) + 'px'
        });
        $(".slider-normal .owl-controls").css({
            'top': + (heightImg/2 - 20) + 'px'
        });
    };

    $(document).ready(jqUpdateSize);    // When the page first loads
    $(window).resize(jqUpdateSize);     // When the browser changes size

    /*slider normal*/
    
    $('.slider-normal').owlCarousel({       
        loop: true,
        margin: 30,
        nav: true,
        dots: true,
        responsive: {
            0: {
                items: 2
            },
            600: {
                items: 3
            },
            1000: {
                items: 4
            },
            1200: {
                items: 4
            }
        }
    });  

    /*slider blogs*/
    $('.slider-blogs').owlCarousel({       
        loop: true,
        margin: 30,
        nav: true,
        dots: true,
        responsive: {
            0: {
                items: 1
            },
            600: {
                items: 2
            },
            1000: {
                items: 2
            },
            1200: {
                items: 2
            }
        }
    }); 


    /*slider client*/
    $('.slider-client').owlCarousel({       
        loop: true,
        margin: 30,
        nav: true,
        dots: true,
        responsive: {
            0: {
                items: 2
            },
            600: {
                items: 4
            },
            1000: {
                items: 6
            },
            1200: {
                items: 6
            }
        }
    });

    /*slider client*/
    $('.slider-testimonial').owlCarousel({       
        loop: true,
        margin: 30,
        nav: true,
        dots: true,
        items: 1        
    });
    
    /*back to top*/
    var offset=1020;
    var duration=500;
    $('.back-to-top').hide();
    $(window).scroll(function(){
        if($(this).scrollTop()>offset){
            $('.back-to-top').fadeIn(400);
        }else{
            $('.back-to-top').fadeOut(400);}
    });
    $(".back-to-top").click(function(){
        $("html, body").animate({
            scrollTop:0},"slow");return false;
    });

    /*Time countdown*/
    function getTimeRemaining(endtime) {
        var t = Date.parse(endtime) - Date.parse(new Date());
        var seconds = Math.floor((t / 1000) % 60);
        var minutes = Math.floor((t / 1000 / 60) % 60);
        var hours = Math.floor((t / (1000 * 60 * 60)) % 24);
        var days = Math.floor(t / (1000 * 60 * 60 * 24));
        return {
            'total': t,
            'days': days,
            'hours': hours,
            'minutes': minutes,
            'seconds': seconds
        };
    }

    function initializeClock(id, endtime) {
        var clock = document.getElementById(id);
        var daysSpan = clock.querySelector('.days');
        var hoursSpan = clock.querySelector('.hours');
        var minutesSpan = clock.querySelector('.minutes');
        var secondsSpan = clock.querySelector('.seconds');

        function updateClock() {
            var t = getTimeRemaining(endtime);

            daysSpan.innerHTML = t.days;
            hoursSpan.innerHTML = ('0' + t.hours).slice(-2);
            minutesSpan.innerHTML = ('0' + t.minutes).slice(-2);
            secondsSpan.innerHTML = ('0' + t.seconds).slice(-2);

            if (t.total <= 0) {
                clearInterval(timeinterval);
            }
        }

        updateClock();
        var timeinterval = setInterval(updateClock, 1000);
    }

    var deadline = new Date(Date.parse(new Date()) + 3 * 18 * 43 * 47 * 1000);
    if ($('#clockdiv').length) {
        initializeClock('clockdiv', deadline);
    }
    

    //humberger nav
    $('.humberger-btn').click(function() {
        $('.overlay').show();
        $('.left-sidebar').addClass('left-sidebar-side');
        $('.top-header').addClass('top-header-side');
        $('.all-wrap').addClass('all-wrap-side');
        $('.draw-humberger').addClass('draw-humberger-x');
        $('body').addClass('no-scroll');
        $('.all-wrap').addClass('no-scroll');
        $('.header').css('position', 'relative');
    });
    $('.overlay').click(function() {
        $('.left-sidebar').removeClass('left-sidebar-side');
        $('.top-header').removeClass('top-header-side');
        $('.all-wrap').removeClass('all-wrap-side');
        $('.draw-humberger').removeClass('draw-humberger-x');
        $('.overlay').hide();
        $('body').removeClass('no-scroll');
        $('.all-wrap').removeClass('no-scroll');
        $('.header').css('position', 'fixed');
    });

    /*-------------------------------------------------
    HOME 2
    ---------------------------------------------------*/
    /*slider home2*/    
    $('.slider-style .slider-main').owlCarousel({       
        loop: true,
        nav: true,
        dots: true,
        items: 1,
        autoplay: true,
        autoPlaySpeed: 6000,
        autoPlayTimeout: 5000,
        autoplayHoverPause: true,
        lazyLoad: true,
        lazyContent: true
    });  

    /*header2*/
    if ($('.slider-style2').length) {
        var menuPosition = $('.slider-style2').offset().top;
        $(window).scroll(function () {
            var currentScroll = $(this).scrollTop();
            if (currentScroll > menuPosition) {
                $('.header-2').addClass('header-2-fix');
            } else {
                 $('.header-2').removeClass('header-2-fix');
            }
        });
    }
    
    /*-------------------------------------------------
    HOME 3
    ---------------------------------------------------*/
    /*mega menu show hide*/
    $('.circle-brand').hover(function() {
        $('.mega-menu-home3 .mega-menu').addClass('show-mega');
    }, function() {                
    });
    $( ".mega-menu-home3 .mega-menu" ).mouseleave(function() {
        $(this).removeClass('show-mega');
    });

    /*----------------------------------------------------
    HOME 6
    ------------------------------------------------------*/
    $('.header-6 .mega-menu-li').hover(function() {
        var megaLeft = $(this).position().left;
        $(this).children('.header-6 .mega-menu').css({
            'left': '-' + (megaLeft + navWidth / 4 + 22) + 'px'
        });
        $(this).children('.header-6 .mega-menu').addClass('show-mega');
    }, function() {
        $(this).children('.header-6 .mega-menu').removeClass('show-mega');
    });

    /*PAGES*/
    /*Range Price Filter*/
    $(document).ready(function() {
        $('.slider-range-price').each(function(){
            var min             = $(this).data('min');
            var max             = $(this).data('max');
            var unit            = $(this).data('unit');
            var value_min       = $(this).data('value-min');
            var value_max       = $(this).data('value-max');
            var label_reasult   = $(this).data('label-reasult');
            var t               = $(this);
            $( this ).slider({
              range: true,
              min: min,
              max: max,
              values: [ value_min, value_max ],
              slide: function( event, ui ) {
                var result = label_reasult +" "+ unit + ui.values[ 0 ] +' - '+ unit +ui.values[ 1 ];
                t.closest('.price_slider_wrap').find('.amount-range-price').html(result);
              }
            });
        });
    });
    /*Select Chosen*/
    $(document).ready(function() {
        $('select').chosen();    
    });
    // Chosen touch support.
    if ($('.chosen-container').length > 0) {
      $('.chosen-container').on('touchstart', function(e){
        e.stopPropagation(); e.preventDefault();
        // Trigger the mousedown event.
        $(this).trigger('mousedown');
      });
    }
    /*product hover*/
    $('.images-tran').hover(function(){            
            $(this).children('img:nth-child(1)').addClass('move-left');
            $(this).children('img:nth-child(2)').addClass('move-right');
        },function(){

    });    
    /*show hide left sidebar categories pages*/
    $('.open-leftsidebar').click(function(){
        $('.sidebar-collapse').show();
        $(this).hide();
        $('.closer-leftsidebar').show();
    });
    $('.closer-leftsidebar').click(function(){
        $('.sidebar-collapse').hide();
        $(this).hide();
        $('.open-leftsidebar').show();
    });
    /*products view*/
    if ($('#img1').length > 0) {
        $("#img1").elevateZoom({ gallery: 'gallery_01', cursor: 'pointer', galleryActiveClass: "active" });
        $("#img1").bind("click", function(e) {
            var ez = $('#img1').data('elevateZoom');
            ez.closeAll(); 
            $.fancybox(ez.getGalleryList());
            return false;
        }); 
    }    
    /*quantity*/
    jQuery('<div class="quantity-nav"><div class="quantity-button quantity-up">+</div><div class="quantity-button quantity-down">-</div></div>').insertAfter('.quantity input');
    jQuery('.quantity').each(function() {
      var spinner = jQuery(this),
        input = spinner.find('input[type="number"]'),
        btnUp = spinner.find('.quantity-up'),
        btnDown = spinner.find('.quantity-down'),
        min = input.attr('min'),
        max = input.attr('max');

      btnUp.click(function() {
        var oldValue = parseFloat(input.val());
        if (oldValue >= max) {
          var newVal = oldValue;
        } else {
          var newVal = oldValue + 1;
        }
        spinner.find("input").val(newVal);
        spinner.find("input").trigger("change");
      });

      btnDown.click(function() {
        var oldValue = parseFloat(input.val());
        if (oldValue <= min) {
          var newVal = oldValue;
        } else {
          var newVal = oldValue - 1;
        }
        spinner.find("input").val(newVal);
        spinner.find("input").trigger("change");
      });

    });

    /*BLOGS*/
    /*slider galery blogs*/
    $('.galery-blogs').owlCarousel({
        loop:true,
        nav:true,
        margin: 15,
        responsive: {
            0: {
                items: 1
            },
            600: {
                items: 1
            },
            1000: {
                items: 1
            },
            1200: {
                items: 1
            }
        }
    })

    /**/
    $('.grid').masonry({
      // options
      itemSelector: '.grid-item'
    });

    /*popup newletter*/
    /*if($(window).width() >= 768){
        if($('body').hasClass('home')){        
            $.magnificPopup.open({
              items: {
                src:    '<div class="popup-letter">'+
                        '<div class="pl-content">'+
                        '<h3 class="title-unline">Newsletter</h3>'+
                        '<p>Subscribe to our newsletters and don’t miss our exclusive offers and promotions.</p>'+
                        '<form><div class="form-group">'+
                        '<input type="email" class="form-control" placeholder="Email">'+
                        '</div>'+
                        '<button type="submit" class="button submit">Subscribe</button>'+
                        '</form></div><div class="border-box"></div><img src="images/bg-popup.jpg" alt="popup">'+
                        '</div>',            
                type: 'inline'
              }
            });
        }
    }*/

})(jQuery);

https://t.me/RX1948 - 2025