Skip to content

Instantly share code, notes, and snippets.

View willcooley's full-sized avatar

Chris Cooley willcooley

View GitHub Profile
@willcooley
willcooley / audio.js
Last active August 29, 2015 14:00
NEW PROJECT: (4/24/2014) AudioPlayer I am currently working on to make into a plugin for free use. It's something I threw together over a few hours for a project I am working on with a software engineer. I know it isn't the best, but for testing purposes it works fine, haha. Will upload source code soon as a demo to play with.
// JavaScript Document
$(document).ready(function(){
var audioFile = $('.audio-file')[0];
var currentPosition = audioFile.currentTime;
var audioFileSrc = $('.audio-file > source').attr('src');
var audioInterval;
var sliderInterval;
var i = $('.speaker-bar').children().length;// tells us how many child elements there are to loop through
var n;