$(document).ready(function(){ // Add scrollspy to $('body').scrollspy({target: ".nav", offset: 50}); // Add smooth scrolling on all links inside the navbar $(".nav a").on('click', function(event) { // Make sure this.hash has a value before overriding default behavior if (this.hash !== "") { // Prevent default anchor click behavior event.preventDefault(); // Store hash var hash = this.hash; // Using jQuery's animate() method to add smooth page scroll // The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area $('html, body').animate({ scrollTop: $(hash).offset().top }, 800, function(){ // Add hash (#) to URL when done scrolling (default click behavior) window.location.hash = hash; }); } // End if }); }); $(document).ready(function(){ $('.owltimeline').owlCarousel({ margin:10, dots:true, nav:false, responsiveClass:true, responsive:{ 0:{ items:1, nav:false, dots:true, loop:false }, 600:{ items:2, loop:false }, 1000:{ items:3, loop:false } } }); $('.owlportfolio').owlCarousel({ center: true, items:1, loop:true, margin:10, nav:false, responsive:{ 600:{ items:2 }, 1000:{ items:4 } } }) }); var skill_height = document.getElementById('skill').clientHeight; var about_height = document.getElementById('about').clientHeight; var profile_height = document.getElementById('profile').clientHeight; if(profile_height>skill_height && profile_height>about_height){ $('#skill').css("height",profile_height+6); $('#about').css("height",profile_height+6); }