View scroll.js
//Custom scroll animator w/ easing support & requestAnimationFrame, who needs jQuery ^ ^
//Supports window (use 'window') and element (use document.querySelector(...)[0]) scrolling
//Want features? Use jQuery.
// - Element: [required] The element you want the scroll to apply to. Use 'window' for window
// - To: [required] the offset (in px) to scroll to. Note that it will add this to the current position
// - Duration: [required] the duration (in ms) for the scrolling animation
// - Direction: [optional] (default: 'horizontal') The direction for the scrolling animation (horizontal | vertical)
View breakpoint.js
//The magic..
function determineBreakpoint() {
return window.getComputedStyle(document.querySelector('.mq_current'), ':before').getPropertyValue('content').replace(/"/g,'');
//Bonus: Provide a object w/ breakpoints. Ex { "l": 1, "m": 2, "s": 4 } So you won't have to process the breakpoint using a switch
function propertyByBreakpoint(properties) {
if (!properties || typeof properties !== 'object') {
return false;