Skip to content

Instantly share code, notes, and snippets.

View aaronfischer's full-sized avatar

Aaron Fischer aaronfischer

View GitHub Profile
@aaronfischer
aaronfischer / gist:a0a3462d861c76c1b7f1
Created July 8, 2014 15:56
Loop through json Object
$.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;
@aaronfischer
aaronfischer / video.html
Last active February 21, 2016 05:23
Full screen background video
<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>
@aaronfischer
aaronfischer / waypoint.js
Created April 19, 2014 14:31
Waypoint.js Snippet
/*********************************************************
/
/ 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 + '"]');
@aaronfischer
aaronfischer / gist:8961255
Last active April 22, 2019 09:52
Lead Form Tracking
/*-------------------------------------------------------------------
*
* 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
*
-------------------------------------------------------------------*/
@aaronfischer
aaronfischer / iOS Slider basic setup + helper functions
Created January 22, 2014 19:54
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);