This file contains 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
var countTo = angular.module('countTo', []) | |
.directive('countTo', [function () { | |
return { | |
replace: false, | |
scope: true, | |
link: function (scope, element, attrs) { | |
var e = element[0]; | |
var num, countToDuration, countTo, value; | |
var counter = { number: 0 }; // Must be an object to comply with GSAP |
This file contains 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
<?php | |
/** | |
* implements hook_menu | |
*/ | |
function json_search_menu (){ | |
$items['json/search/%'] = array( | |
'page callback' => '_json_search', | |
'access arguments' => array('access content'), | |
'page arguments' => array(2), | |
'type' => MENU_CALLBACK, |
This file contains 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
angularApp.run(function($http, CacheFactory, $rootScope, $timeout, $window, $location, $route) { | |
var original = $location.path; | |
$location.path = function (path, reload) { | |
if (reload === false) { | |
var lastRoute = $route.current; | |
var un = $rootScope.$on('$locationChangeSuccess', function () { | |
$route.current = lastRoute; | |
un(); | |
}); |
This file contains 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
for(var key in _config) | |
if(_config.hasOwnProperty(key)) | |
defaults[key] = _config[key]; |
This file contains 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 windowScrollToCSS(_config, _callback) { | |
var current, target, windowFinalY = 0, | |
defaults = { | |
to: 0, | |
scrollTime: 1.5, | |
easing: Power2.easeInOut, | |
delay: 0, | |
menu: true, | |
element: false, | |
force: false, |
This file contains 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
// Gulp | |
var gulp = require('gulp'); | |
// Gulp plug-ins | |
var plumber = require('gulp-plumber'), // Error pipe streaming | |
util = require('gulp-util'), // Extends gulp utilities | |
notify = require('gulp-notify'); // Toast notifications for MacOS and Windows | |
// Error reporting function. |
This file contains 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
// RAF Polyfill | |
var lastTime = 0, | |
vendors = ['ms', 'moz', 'webkit', 'o'], | |
x, | |
length, | |
currTime, | |
timeToCall; | |
for(x = 0, length = vendors.length; x < length && !window.requestAnimationFrame; ++x) { | |
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; |
This file contains 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
var scrollTime = 0.5; | |
var scrollDistance = 170; | |
window.addEventListener('mousewheel', function(event){ | |
event.preventDefault(); | |
// Make header reapper if we are scrolling | |
if (globals.hidebars === true) { | |
globals.hidebars = false; | |
} |
This file contains 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
// Gulp | |
var gulp = require('gulp'); | |
// Gulp plug-ins | |
var watch = require('gulp-watch'), // Watcher, runs tasks on file change | |
concat = require('gulp-concat'), // Concatenation of files | |
jshint = require('gulp-jshint'), // JS Linting | |
compass = require('gulp-compass'), // SASS compilator including Compass mixin libraries. | |
jade = require('gulp-jade'), // Compiles .jade files into raw HTML | |
minifyCSS = require('gulp-minify-css'), // Minify CSS |
This file contains 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
// Script to sit inside the form page | |
var cookies = document.cookie; | |
var referrer = document.referrer; | |
var isSafari = /^((?!chrome).)*safari/i.test(navigator.userAgent); | |
if(isSafari && !navigator.userAgent.match('CriOS')) { | |
if ((cookies === '' || | |
!cookies || |