Skip to content

Instantly share code, notes, and snippets.

View aucrawford's full-sized avatar

A. U. Crawford aucrawford

View GitHub Profile
@aucrawford
aucrawford / media.js
Created January 30, 2015 01:52
The main function of this was to provide interactivity to two rotators, on a responsive media page, for a rails project I was part of.
jQuery('document').ready(function($) {
var $imageItem = $('#image_gallery .rotator_item')
, $videoItem = $('#video_gallery .rotator_item')
;
// resize images to fix thumbnail
$("#image_gallery .rotator_item img").each(function() {
var $image = $(this);
$image.on("load", function(){