Skip to content

Instantly share code, notes, and snippets.

View jbell0385's full-sized avatar

Jeremy Bell jbell0385

View GitHub Profile
function snap(flashPile, turtlePile) {
function snapHelper(flashPile2, turtlePile2, snaps){
if(turtlePile2.length<=0){
return snaps;
}
var tpLength = turtlePile2.length;
var i = 0;
var middleDeck = [];
while(i<tpLength){
@jbell0385
jbell0385 / module-completion-tracker.js
Created June 28, 2018 22:14
Module Completion Tracker
////////////////////////////////////////////////////////////////////////////////
// Create colored left borders on module items that indicate completion status//
////////////////////////////////////////////////////////////////////////////////
//Check to see if we're on the module page by looking for '.module-item-status-icon i'
$('.module-item-status-icon i').ready(function(){
//I was having problems with this code executing before the page fully loaded. document.ready doesn't even seem to work. Probably needs to be refactored
$(document).ready(()=>{
//to solve my code running before page finished loading problem I had to put in this bandaid. You may need to adjust the timeout or if you can refactor this that would be great.
setTimeout(()=>{
@jbell0385
jbell0385 / Canvas-Sidebar-Lesson-Menu.js
Last active June 27, 2018 20:28
Canvas Scrolling Side Menu
//////////////////////////
// waypoint Sidebar menu//
//////////////////////////
//waypoint: http://imakewebthings.com/waypoints/
//CSS Styles: .sidebar-menu /.sidebar-menu .card-body /.sidebar-show
/*
Roadmap:
1) Grab all the concept blocks and waypoint div elements
2) Create waypoints for each waypoint found in the dom
3) If user scrolling down then show sidebar