Created
December 20, 2011 22:16
-
-
Save orlando/1503541 to your computer and use it in GitHub Desktop.
jquery timeslider
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
$("li.month").click(function(e){ | |
e.preventDefault(); | |
var selected_month = $(this).closest('li').index(); | |
$("#slider-range").slider("values",[Math.abs(moment([moment().year()]).diff(moment([moment().year()]).month(selected_month-1),'month')),Math.abs(moment([moment().year()]).diff(moment([moment().year()]).month(selected_month),'days'))]); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment