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 s = r_obj.path(county.path); | |
s.attr({ | |
stroke: '#999', | |
'stroke-width': '.3', | |
fill: 'url(http://www.washingtonpost.com/wp-srv/special/politics/primary-tracker/images/hash-bg-sm.png)', | |
'fill-opacity' : '.5', | |
'stroke-linejoin': 'round' | |
}); | |
$(s.node).attr({ | |
'name': county.name, |
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
//for each path you draw | |
// var path should contain string with path coords | |
var c = paper.path(path); | |
//six params: 1 and 4 are scale, 5 is x, 6 is y, | |
//more details here: http://cancerbero.vacau.com/raphaeltut/#sec-types-transform | |
c.matrix.add(.4, 0, 0, .4, -200, -50); | |
//apply matrix |
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
$birthday = $year.'-'.$month.'-'.$day; | |
$age = date_diff(date_create($birthday), date_create('now'))->y; |
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
// left/right key press | |
$(document).keydown(function(e) { | |
if (e.which == 37) { // left key | |
$('#slideshow').cycle('prev'); | |
} else if (e.which == 39) { // right key | |
$('#slideshow').cycle('next'); | |
} | |
}); |