new WOW().init(); jQuery(document).ready(function($) { $(window).bind("load", function () { $('#loader').fadeOut(700); }); $(function(){ $(".typed").typed({ strings: ["Hey,", "Hello,\n^10Welcome to ^10my domain ^10...^10", "Hello, \nWelcome to my little corner of the internet. \n^10It's nice to ", "Hello, \nWelcome to my little corner of the internet. \nIt's very nice to have you here!^10\n"], typeSpeed: -40, backSpeed: -70, startDelay: 0, backDelay: 0, loop: false, loopCount: false, attr: null, callback: function(){ shift(); } }); }); function shift(){ $('.leader').ScrollTo({ duration: 1500, easing: 'linear', durationMode: 'all', callback: function(){ thecollapse(); } }); } function thecollapse(){ //$('.intro').collapse('hide') } $('#nav').affix({ offset: {top: $('.intro').height()-$('#nav').height()} }); $('.nav-toggle').on( 'click', function() { $( this ).toggleClass( 'active' ); }); ;(function ($) { 'use strict'; var content = $('.transit').smoothState({ onStart : { duration: 250, render: function () { content.toggleAnimationClass('is-exiting'); } } }).data('smoothState'); })(jQuery); 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'); } else { $('.navbar').removeClass('visible fixed'); } } else { $('.navbar').removeClass('visible'); if (currentTop > headerHeight && !$('.navbar').hasClass('fixed')) $('.navbar').addClass('fixed'); } this.previousTop = currentTop; }); var commentsDiv = $('#comments'); if (commentsDiv.length) { $(commentsDiv).hide(); $('.toggle-comments').on('click', function(e) { e.preventDefault(); $(commentsDiv).toggle('slow', function() { var anchor = $('.toggle-comments'); var anchorText = anchor.text() === 'Hide Comments' ? 'Show Comments' : 'Hide Comments'; $(anchor).text(anchorText); }); }); } }); ;(function ($) { 'use strict'; var $body = $('html, body'), content = $('#big-top').smoothState({ prefetch: true, pageCacheSize: 4, onStart: { duration: 250, render: function (url, $container) { content.toggleAnimationClass('is-exiting'); $body.animate({ scrollTop: 0 }); } } }).data('smoothState'); })(jQuery);