Created
January 22, 2016 11:38
-
-
Save fieldoffice/2ab2d14d036d22e0f60b to your computer and use it in GitHub Desktop.
Responsive Sparklines
This file contains hidden or 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
$(function() { | |
var sparklineLogin = function() { | |
$('#mysparkline').sparkline( | |
[ 42,52,63,12,18,23,45,78,92,87 ], | |
{ | |
type: 'line', | |
width: '100%', | |
height: '40px' | |
} | |
); | |
} | |
var sparkResize; | |
$(window).resize(function(e) { | |
clearTimeout(sparkResize); | |
sparkResize = setTimeout(sparklineLogin, 500); | |
}); | |
sparklineLogin(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment