/* ===================================== template name: mediplus. author name: naimur rahman website: http://wpthemesgrid.com/ description: mediplus - doctor html template. version: 1.1 ========================================*/ /*======================================= [start activation code] ========================================= * sticky header js * search js * mobile menu js * hero slider js * testimonial slider js * portfolio slider js * clients slider js * single portfolio slider js * accordion js * nice select js * date picker js * counter up js * checkbox js * right bar js * video popup js * wow js * scroll up js * animate scroll js * stellar js * google maps js * preloader js ========================================= [end activation code] =========================================*/ (function($) { "use strict"; $(document).on('ready', function() { jquery(window).on('scroll', function() { if ($(this).scrolltop() > 200) { $('#header .header-inner').addclass("sticky"); } else { $('#header .header-inner').removeclass("sticky"); } }); /*==================================== sticky header js ======================================*/ jquery(window).on('scroll', function() { if ($(this).scrolltop() > 100) { $('.header').addclass("sticky"); } else { $('.header').removeclass("sticky"); } }); /*==================================== search js ======================================*/ $('.search a').on( "click", function(){ $('.search-top').toggleclass('active'); }); /*==================================== mobile menu ======================================*/ $('.menu').slicknav({ prependto:".mobile-nav", duration: 300, closeonclick:true, }); /*=============================== hero slider js =================================*/ $(".hero-slider").owlcarousel({ loop:true, autoplay:true, smartspeed: 500, autoplaytimeout:3500, singleitem: true, autoplayhoverpause:true, items:1, nav:true, navtext: ['', ''], dots:false, }); /*=============================== testimonial slider js =================================*/ $('.testimonial-slider').owlcarousel({ items:3, autoplay:true, autoplaytimeout:4500, smartspeed:300, autoplayhoverpause:true, loop:true, merge:true, nav:false, dots:true, responsive:{ 1: { items:1, }, 300: { items:1, }, 480: { items:1, }, 768: { items:2, }, 1170: { items:3, }, } }); /*=============================== portfolio slider js =================================*/ $('.portfolio-slider').owlcarousel({ autoplay:true, autoplaytimeout:4000, margin:15, smartspeed:300, autoplayhoverpause:true, loop:true, nav:true, dots:false, responsive:{ 300: { items:1, }, 480: { items:2, }, 768: { items:2, }, 1170: { items:4, }, } }); /*===================================== counter up js ======================================*/ $('.counter').counterup({ delay:20, time:2000 }); /*=============================== clients slider js =================================*/ $('.clients-slider').owlcarousel({ items:5, autoplay:true, autoplaytimeout:3500, margin:15, smartspeed: 400, autoplayhoverpause:true, loop:true, nav:false, dots:false, responsive:{ 300: { items:1, }, 480: { items:2, }, 768: { items:3, }, 1170: { items:5, }, } }); /*==================================== single portfolio slider js ======================================*/ $('.pf-details-slider').owlcarousel({ items:1, autoplay:false, autoplaytimeout:5000, smartspeed: 400, autoplayhoverpause:true, loop:true, merge:true, nav:true, dots:false, navtext: ['', ''], }); /*=================== accordion js =====================*/ $('.accordion > li:eq(0) a').addclass('active').next().slidedown(); $('.accordion a').on('click', function(j) { var dropdown = $(this).closest('li').find('p'); $(this).closest('.accordion').find('p').not(dropdown).slideup(300); if ($(this).hasclass('active')) { $(this).removeclass('active'); } else { $(this).closest('.accordion').find('a.active').removeclass('active'); $(this).addclass('active'); } dropdown.stop(false, true).slidetoggle(300); j.preventdefault(); }); /*==================================== nice select js ======================================*/ $('select').niceselect(); /*===================================== date picker js ======================================*/ $( function() { $( "#datepicker" ).datepicker(); } ); /*=============================== checkbox js =================================*/ $('input[type="checkbox"]').change(function(){ if($(this).is(':checked')){ $(this).parent("label").addclass("checked"); } else { $(this).parent("label").removeclass("checked"); } }); /*=============================== right bar js =================================*/ $('.right-bar .bar').on( "click", function(){ $('.sidebar-menu').addclass('active'); }); $('.sidebar-menu .cross').on( "click", function(){ $('.sidebar-menu').removeclass('active'); }); /*===================== video popup js =======================*/ $('.video-popup').magnificpopup({ type: 'video', }); /*================ wow js ==================*/ var window_width = $(window).width(); if(window_width > 767){ new wow().init(); } /*=================== scroll up js =====================*/ $.scrollup({ scrolltext: '', easingtype: 'easeinoutexpo', scrollspeed: 900, animation: 'fade' }); /*======================= animate scroll js =========================*/ $('.scroll').on("click", function (e) { var anchor = $(this); $('html, body').stop().animate({ scrolltop: $(anchor.attr('href')).offset().top - 100 }, 1000); e.preventdefault(); }); /*======================= stellar js =========================*/ $.stellar({ horizontaloffset: 0, verticaloffset: 0 }); /*==================== google maps js ======================*/ var map = new gmaps({ el: '#map', lat: 23.011245, lng: 90.884780, scrollwheel: false, }); map.addmarker({ lat: 23.011245, lng: 90.884780, title: 'marker with infowindow', infowindow: { content: '

welcome to medipro

' } }); }); /*==================== preloader js ======================*/ $(window).on('load', function() { $('.preloader').addclass('preloader-deactivate'); }); })(jquery);