芝麻web文件管理V1.00
编辑当前文件:/var/www/cognitio.in/cognitio_inquiry/js/common.js
$(document).ready(function() { $('.modal').on('hidden.bs.modal', function() { $(this).find('form')[0].reset() $(".error").hide(); }); // var is_scrolling = false; // if ($(window).width() > 992) { // $(window).scroll(function() { // is_scrolling = true; // }); // $('#contactform').modal('show'); // } // setInterval(function() { // if (is_scrolling == true) { // var ypos = $(window).scrollTop(); // if (ypos > 100) { // $('#contactform').modal('hide'); // } else { // $('#contactform').modal('show'); // } // is_scrolling = false; // } // }, 50); $('#banner-carousel').owlCarousel({ dots: true, items: 1, loop: true, autoplay: true, autoplayTimeout: 4000, animateOut: 'fadeOut', animateIn: 'fadeIn', responsive: { 0: { items: 1 }, 768: { items: 1 }, 1199: { items: 1, } } }); // Counter $('.count-number').counterUp({ delay: 10, time: 1000 }); $('#project-video').owlCarousel({ dots: true, items: 1, loop: true, autoplay: false, // animateOut: 'fadeOut', // margin:10, nav: true, navText: ["
", "
"], responsive: { 0: { items: 1 }, 768: { items: 1 }, 1199: { items: 1, //margin:20, //nav:true } } }); $('#client-video').owlCarousel({ dots: true, items: 1, loop: true, autoplay: false, nav: true, navText: ["
", "
"], responsive: { 0: { items: 1 }, 768: { items: 1 }, 1199: { items: 1, } } }); $('#clientele-row').owlCarousel({ dots: false, items: 1, loop: true, autoplay: true, autoplayTimeout: 2000, nav: true, navText: ["
", "
"], responsive: { 0: { items: 2 }, 768: { items: 2 }, 1199: { items: 5, } } }); }) // Youtube Video Lighbox // Function to reveal lightbox and adding YouTube autoplay function revealVideo(div, video_id) { var video = document.getElementById(video_id).src; // adding autoplay to the URL // document.getElementById(video_id).src = video + '&autoplay=1'; document.getElementById(div).style.display = 'block'; } // Hiding the lightbox and removing YouTube autoplay function hideVideo(div, video_id) { var video = document.getElementById(video_id).src; // removing autoplay form url var cleaned = video.replace('&autoplay=1', ''); document.getElementById(video_id).src = cleaned; document.getElementById(div).style.display = 'none'; }