This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Project", | |
"version": "0.1.0", | |
"devDependencies": { | |
"grunt": "^0.4.5", | |
"grunt-autoprefixer": "^2.0.0", | |
"grunt-contrib-concat": "^0.5.0", | |
"grunt-contrib-imagemin": "^0.9.2", | |
"grunt-contrib-jshint": "~0.10.0", | |
"grunt-contrib-nodeunit": "~0.4.1", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
uglify: { | |
build: { | |
src: 'includes/production/js/production.js', | |
dest: 'includes/production/js/production.min.js' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Helper functions. | |
*/ | |
//add | |
function addClass(el, cls){ | |
return (el.className == "") ? el.className += cls : el.className += " "+cls; | |
} | |
//remove |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
button.onclick = function(){ | |
//get current scrollpos and calculate step | |
var offset = this.getBoundingClientRect(), | |
scrollStep = -window.pageYOffset / (500/15); | |
//call our scroll top function | |
scrollToTop(scrollStep); | |
}; | |
/* | |
Scroll to top function. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTMLElement.prototype.addClass = function(cls){ | |
return this.classList.add(cls); | |
}; | |
HTMLElement.prototype.removeClass = function(cls){ | |
return this.classList.remove(cls); | |
}; | |
HTMLElement.prototype.hasClass = function(cls){ | |
return this.classList.Contains(cls); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--[if IE 8]> | |
<img alt='Chase.com <http://Chase.com> Homepage' src='includes/production/images/logo.png'> | |
<![endif]--> | |
<img alt='Chase.com <http://Chase.com> Homepage' class='svgimg' onerror="this.src='includes/production/images/logo.png'; this.onerror=null;" src='includes/production/images/logo.svg'> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width"/> | |
<link rel="stylesheet" href="ink.css"> <!-- For testing only --> | |
<style type="text/css"> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var t; | |
$(window).scroll(function() { | |
clearTimeout(t); | |
t = setTimeout(function() { | |
alert("Scrolled Once!"); | |
}, 250); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
sass: { | |
dist: { | |
files: { | |
'css/main.css' : 'sass/main.scss' | |
} | |
} | |
}, |