This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Smooth scroll to content | |
$('a[href*=#]:not([href=#])').click(function() { | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') || location.hostname == this.hostname) { | |
var targetH = $(this.hash), | |
target = targetH.length ? targetH : $('[name=' + this.hash.slice(1) +']'); | |
if (target.length) { | |
$('html,body').animate({ | |
scrollTop: target.offset().top - 60 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Wordpress Pagination | |
* http://codex.wordpress.org/Function_Reference/paginate_links | |
*/ | |
<div class="pagination-wrap"> | |
<?php | |
// pagination | |
global $wp_query; | |
$big = 999999999; // need an unlikely integer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function headerHide() { | |
// Hide Header on scroll down | |
var didScroll; | |
var lastScrollTop = 0; | |
var delta = 5; | |
var navbarHeight = $('.header-global').outerHeight(); | |
$(window).scroll(function(event){ | |
didScroll = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aside> | |
<nav class="page-sub-navigation"> | |
<?php | |
// get child pages from post parent, otherwise | |
// get child pages from the current page being viewed, in most cases the parent | |
if ($post->post_parent) { | |
$page_list = wp_list_pages( 'title_li=&display=0&child_of='.$post->post_parent.'&echo=0' ); | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function() { | |
var $nav = $('.nav-global'), | |
$toggle = $('.menu-trigger'), | |
$active_class = 'nav-active', | |
prevent_default = function(e) { | |
e = e || window.event; | |
if (e.preventDefault) | |
e.preventDefault(); | |
e.returnValue = false; |