Skip to content

Instantly share code, notes, and snippets.

@cmpolis
cmpolis / gist:5954639
Last active December 19, 2015 12:28
scrollIt.js Options
$.scrollIt({
upKey: 38, // key code to navigate to the next section
downKey: 40, // key code to navigate to the previous section
easing: 'linear', // the easing function for animation
scrollTime: 600, // how long (in ms) the animation takes
activeClass: 'active', // class given to the active nav element
onPageChange: null, // function(pageIndex) that is called when page is changed
topOffset: 0 // offste (in px) for fixed top navigation
});
@cmpolis
cmpolis / gist:5954658
Created July 9, 2013 04:16
ScrollIt.js step 1
<script src="jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="scrollIt.js" type="text/javascript"></script>
@cmpolis
cmpolis / gist:5954675
Last active December 19, 2015 12:28
ScrollIt.js step 2
<div data-scroll-index="0">..content..</div>
<div data-scroll-index="1">...</div>
<div data-scroll-index="2">...</div>
@cmpolis
cmpolis / gist:5954686
Created July 9, 2013 04:22
ScrollIt.js step 3
<a data-scroll-nav="0">About</a>
<a data-scroll-nav="1">Usage</a>
<a data-scroll-nav="2">Options</a>
@cmpolis
cmpolis / gist:5954690
Created July 9, 2013 04:23
ScrollIt.js step 4
<a data-scroll-goto="0">Back to top</a>
@cmpolis
cmpolis / gist:5954703
Created July 9, 2013 04:24
ScrollIt.js step 5
$(function(){
$.scrollIt();
});
$(document).on 'page:load', () ->
return unless $('#ca-vis').length
#
margin = { top: 0, right: 60, left: 50, bottom: 100 }
width = $('.container').width() - margin.right - margin.left
height = 540 - margin.top - margin.bottom
colors = ['#8dd3c7', '#E1C368', '#bebada', '#fb8072', '#80b1d3', '#fdb462',
'#b3de69', '#fccde5', '#d9d9d9', '#bc80bd', '#ccebc5', '#ffed6f']
@cmpolis
cmpolis / index.html
Last active August 29, 2015 13:57 — forked from milroc/README.md
Airline Routes within the US
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<style>
path {
fill: none;
}
#airports circle {
fill: #333333;
}
@cmpolis
cmpolis / .vimrc
Created September 11, 2015 22:58
syntax enable
set nu
set et
set tabstop=2
set autoindent
set pastetoggle=<F2>
" Show trailing whitespace
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
@cmpolis
cmpolis / README.md
Created October 28, 2015 00:06
fresh block