123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- new WOW().init();
- jQuery(document).ready(function($) {
- $(window).bind('load', function() {
- $('#loader').fadeOut(2000);
- });
- $(function () {
- $('[data-toggle="tooltip"]').tooltip()
- })
- var person = localStorage.getItem('person');
- $('.nav-toggle').on('touchstart click', function(e) {
- e.preventDefault();
- $( this ).toggleClass( 'active' );
- });
- $(function dw_hidenav() {
- var headerHeight = $('.navbar').height();
- $(window).on('scroll', { previousTop: 0 },
- function() {
- var currentTop = $(window).scrollTop();
- if (currentTop < this.previousTop) {
- if (currentTop > 0 && $('.navbar').hasClass('fixed')) {
- $('.navbar').addClass('visible');
- $('.site-title a').removeClass('light');
- } else {
- $('.navbar').removeClass('visible fixed');
- $('.site-title a').addClass('light');
- }
- }
- else {
- $('.navbar').removeClass('visible');
- if (currentTop > headerHeight && !$('.navbar').hasClass('fixed')) $('.navbar').addClass('fixed');
- }
- this.previousTop = currentTop;
- }
- );
- });
- var vidout = document.getElementById('tv');
- vidout.play();
- $('#caro-lead').carousel({
- interval: 5000,
- cycle: true,
- wrap: true
- });
- $('#caro-lead').on('slid.bs.carousel', function(event) {
- var consta = $('#caro-lead li.active');
- console.log('target: ' + consta.data('target') + ' value: ' + ' slide-to: ' + consta.data('slideTo'));
- $('.carousel-caption').fadeIn(600);
- setTimeout(function() {
- if (consta.data('slideTo') === 0) {
- }
- if (consta.data('slideTo') === 1) {
- }
- if (consta.data('slideTo') === 2) {
- }
- }, 10);
- });
- $('#caro-lead').on('slid.bs.carousel', function() {
- $('.active .animac').removeClass('hide-svg fade-svg');
- var animac = new DrawFillSVG({elementId: 'brain'});
- animac.replay();
- });
- $(document).bind('keyup', function(e) {
- if(e.which === 39){
- $('#caro-lead').carousel('next');
- }
- else if(e.which === 37){
- $('#caro-lead').carousel('prev');
- }
- });
- /*============================================
- Form
- ==============================================*/
- $('#commentform').validate({
- rules: {
- author: {
- required: true,
- minlength: 2
- },
- email: {
- required: true,
- email: true
- },
- comment: {
- required: true,
- minlength: 3
- }
- },
- messages: {
- author: 'Please enter in your name.',
- email: 'Please enter a valid email address.',
- comment: 'Nothing to Say?'
- },
- errorElement: 'div',
- errorPlacement: function(error, element) {
- element.before(error);
- }
- });
- /*============================================
- Calendar
- ==============================================*/
- var calendarEl = document.getElementById('calendar');
- var calendar = new FullCalendar.Calendar(calendarEl, {
- plugins: [ 'dayGrid', 'googleCalendar' ],
- header: {
- left: 'title ',
- center: '',
- right: 'prev,next '
- },
- firstDay : 1,
- height: 345,
- defaultView: 'dayGridMonth',
- googleCalendarApiKey: 'AIzaSyAGowGJYx6dOaQvG_vSUI73uT88VWOTcNQ',
- events: {
- googleCalendarId: 'davidawindham.com_bvrht1f8n2vgldgjenpgfdd4bk@group.calendar.google.com',
- className: 'gcal-event'
- },
- eventRender: function(info) {
- },
- eventClick: function(info) {
- info.jsEvent.preventDefault();
- }
- });
- calendar.render();
- });
|