View waypoint.js
/*********************************************************
/
/ Waypoints
/
*********************************************************/
$(function () {
if($(window).width() >= 900 || $('html').hasClass("no-touch")){
var $links = $('.panel-nav li a[href="#' + this.id + '"]');
$('section.panel').waypoint(function(direction) {
var $links = $('.panel-nav li a[href="#' + this.id + '"]');
View gist:a0a3462d861c76c1b7f1
$.getJSON('URL', function(json, textStatus) {
console.log('successful');
}).done(function(json, textStatus){
console.log('doneful');
console.log('prpl',json);
// loop through and grab the message from each commit
var items = [],
elems = json.states;
View gulpfile.js
var gulp = require('gulp'),
// sass = require('gulp-ruby-sass'),
compass = require('gulp-compass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
imagemin = require('gulp-imagemin'),
pngcrush = require('imagemin-pngcrush'),
rename = require('gulp-rename'),
View gist:bba29a2001d489293250
$(document).ready(function() {
$(window).smartresize(function(){
// call a function that needs to run on resize
homePanel();
});
});
(function($,sr){
// debouncing function from John Hann
View smoothscroll.js
/* ----------------------------------------------------------------------------------------------------------
03 scroll to #section-id-of-div
---------------------------------------------------------------------------------------------------------- */
function smoothScroll(el, target){
// if the hash is in the URL but not on the page... ex #cosmetic-surgery but not #section-this-div
if(el !== null){
var $this = $(el),
target = el.hash,
$target = $(target);
// check if the target has an offset, if its NOT undefined then run the code to allow things to scroll
View smartresize.js
/* ----------------------------------------------------------------------------------------------------------
03 SmartResize
---------------------------------------------------------------------------------------------------------- */
(function($,sr){
// debouncing function from John Hann
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
var debounce = function (func, threshold, execAsap) {
var timeout;
View browserUpdate.html
<div id="browserUpdate" class="browserUpdate overlay">
<a href="#" class="overlay-close js-close"><i class="icn-x icon-box -rev"></i></a>
<div class="view view-directory swiper-container browserUpdate-container">
<div class="swiper-slide">
<div class="row cf">
<div class="col-18 ac ci browserUpdate-info">
<img class="browserUpdate-warning-icon" src="/sites/all/themes/adu/assets/media/img/optimized/browserUpdate/warning.png" alt="warning icon">
<h4>Did you know your browser is out of date?</h4>
<p>To get the best possible experience using our website we recommend that you upgrade to a newer version or other web broswer. A list of the most popular web browsers can be found below. </p>
<p><strong>By closing this window you acknowledge that your experience on this website may be degraded.</strong></p>
View iOS Slider basic setup + helper functions
// Slider build pagination before iosslider loads
$('.general .slides').each(function(i,e){
if($(this).find('> .slide').length > 1){
slidePaginate(i,e);
}
});
// this should be run outside of the iosslider load code
function slidePaginate(i,e,el) {
var e = $(e);
View video.html
<video id="video" class="full-bleed" preload="" autoplay="">
<source src="/videos/MMI-Feature-Vid-01.2.webmhd.webm" type="video/webm">
<source src="/videos/MMI-Feature-Vid-01.3.mp4" type="video/mp4">
</video>
View gist:ab2e64ddd7588eda3d92
ffmpeg -i "input.mkv" \
-map 0:0 -map 0:1 -map 0:1 \
-c:v copy \
-c:a:0 libfaac -b:a:0 192k -ac 2 \
-c:a:1 copy \
"output.conv.mkv"