/* ================================= ------------------------------------ ProDent - Dentist Template Version: 1.0 ------------------------------------ ====================================*/ 'use strict'; function toggleProgresBars() { $('.progress-bar-style').each(function() { var progress = $(this).data("progress"); var text = $(this).data("text"); if (text == null) return; var bgcolor = $(this).data("bgcolor"); if (progress <= 100) { $(this).append('
' + text + '
'); } else { $(this).append('
' + text + '
'); } }); $('.progress-bar-style-p').each(function() { var progress = $(this).data("progress"); var bgcolor = $(this).data("bgcolor"); if (progress <= 100) { $(this).append('
' + progress + '%
'); } else { $(this).append('
' + progress + '%
'); } }); }; $(window).on('load', function() { /*------------------ Preloder --------------------*/ $(".loader").fadeOut(); $("#preloder").delay(400).fadeOut("slow"); }); (function($) { /*------------------ Navigation --------------------*/ $('.nav-switch').on('click', function(event) { $(this).toggleClass('active'); $('.nav-warp').slideToggle(400); event.preventDefault(); }); /*------------------ Background Set --------------------*/ $('.set-bg').each(function() { var bg = $(this).data('setbg'); $(this).css('background-image', 'url(' + bg + ')'); }); /*------------------ Progress Bar --------------------*/ /*------------------ Testimonials --------------------*/ $('.testimonials-slider').owlCarousel({ loop: true, nav: false, dots: true, margin: 128, center:true, items: 1, mouseDrag: false, animateOut: 'fadeOutRight', animateIn: 'fadeInLeft', autoplay:true }); /*------------------ Brands Slider --------------------*/ $('.brands-slider').owlCarousel({ loop: true, nav: false, dots: false, margin : 40, autoplay: true, responsive : { 0 : { items: 1, }, 480 : { items: 2, }, 768 : { items: 4, }, 1200 : { items: 5, } } }); /*------------------ Popular Services --------------------*/ $('.popular-services-slider').owlCarousel({ loop: true, dots: false, margin : 40, autoplay: true, nav:true, navText:['',''], responsive : { 0 : { items: 1, }, 768 : { items: 2, }, 991: { items: 3 } } }); /*------------------ Accordions --------------------*/ $('.panel-link').on('click', function (e) { $('.panel-link').removeClass('active'); var $this = $(this); if (!$this.hasClass('active')) { $this.addClass('active'); } e.preventDefault(); }); /*------------------ Circle progress --------------------*/ $('.circle-progress').each(function() { var cpvalue = $(this).data("cpvalue"); var cpcolor = $(this).data("cpcolor"); var cptitle = $(this).data("cptitle"); var cpid = $(this).data("cpid"); $(this).append('

'+ cpvalue +'%

'+ cptitle +'

'); if (cpvalue < 100) { $('.' + cpid).circleProgress({ value: '0.' + cpvalue, size: 110, thickness: 7, fill: cpcolor, emptyFill: "rgba(0, 0, 0, 0)" }); } else { $('.' + cpid).circleProgress({ value: 1, size: 110, thickness: 7, fill: cpcolor, emptyFill: "rgba(0, 0, 0, 0)" }); } }); })(jQuery);