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
// 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); |
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
/*------------------------------------------------------------------- | |
* | |
* TRACK SOURCE WITH A COOKIE | |
* This will check if the query and save its values into a cookie for 180 days and will only be removed if they clear their cookies or if they visit via another source query | |
* ex. http://rmcad.edu/event/rmcad-create-day-0?utm_source=Social&utm_medium=Twitter&utm_campaign=CreateDay2.15 | |
* utm_source = Social | |
* utm_medium = Twitter | |
* utm_campaign = CreateDay2.15 | |
* | |
-------------------------------------------------------------------*/ |
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
/********************************************************* | |
/ | |
/ 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 + '"]'); |
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
<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> |
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
$.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; |
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 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'), |
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
$(document).ready(function() { | |
$(window).smartresize(function(){ | |
// call a function that needs to run on resize | |
homePanel(); | |
}); | |
}); | |
(function($,sr){ | |
// debouncing function from John Hann |
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
/* ---------------------------------------------------------------------------------------------------------- | |
03 Converts all svg images to inline svgs | |
---------------------------------------------------------------------------------------------------------- */ | |
function imgToSvg(){ | |
jQuery('img.svg').each(function(){ | |
var $img = jQuery(this); | |
var imgID = $img.attr('id'); | |
var imgClass = $img.attr('class'); | |
var imgURL = $img.attr('src'); | |
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
/* ---------------------------------------------------------------------------------------------------------- | |
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 |
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
/* ---------------------------------------------------------------------------------------------------------- | |
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; | |
OlderNewer