7

I am looking for a fancy Slider control using JQuery/Javascript. The native JQuery slider is rather bland for this requirement. The slider will be used to specify the volume in the increments of 5. So, this slider should only let user slide in increments of 5.

One nice to have feature is to be able to show label above the slider position indicating what volume the user has selected.

5
  • Whatever you use, be sure to take the logarithm for the final volume multiplier. Commented Mar 5, 2010 at 23:52
  • @Mark - could you go into more detail on that? I'm curious to know what you mean. Commented Mar 5, 2010 at 23:58
  • What's wrong with the jQuery UI slider exactly? You mention it's "too bland" but it meets every requirement...knowing what's wrong with it would help. Commented Mar 6, 2010 at 0:16
  • Can I display a label on the top of the slider selection using the jquery slider? Can I set an image as the background? Can I change the appearance of the slider? Commented Mar 6, 2010 at 0:24
  • Yes to all of the above, posted an answer with examples and links for this. Commented Mar 6, 2010 at 12:57

2 Answers 2

9

Here's an example of the customization you're after that uses the jQuery UI Slider. It's all CSS in the background, you can customize the hell out of it.

Setting the snap you can do increments and update the amount like this:

$("#mySlider").slider({
      orientation: "vertical",
      range: "min",
      min: 0,
      max: 100,
      step: 5,
      slide: function(event, ui) {
           $("#amount").val(ui.value);
      }
 });
$("#amount").val($("#mySlider").slider("value"));
Sign up to request clarification or add additional context in comments.

Comments

2

I've found a nice volume slider. I think this is what you're looking for. It's the classic triangle-shaped controller with increasing vertical bars. And it's very customizable with position indicator. Download the zip file here: http://ruwix.com/javascript-volume-slider-control/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.