Skip to content

Instantly share code, notes, and snippets.

@loopj
Last active December 12, 2015 02:08
Show Gist options
  • Select an option

  • Save loopj/4696332 to your computer and use it in GitHub Desktop.

Select an option

Save loopj/4696332 to your computer and use it in GitHub Desktop.
<div id="slider-value"></div>
<input type="text" data-slider="true" data-slider-values="0,100,500,800">
<script>
var sliderValues = {
0: "None",
100: "Small",
500: "Medium",
800: "Large"
};
$("[data-slider]").bind("slider:changed", function (event, data) {
$("#slider-value").html(sliderValues[data.value]);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment