0

I am not sure what element would be best for the following purpose:

I made a audio player using Web Audio API in Javascript that shows the progress of the sound using the HTML5 progress tag. However, now I want to make it clickable, so that when I click it I get the value of where I can clicked and I adjust the sound file accordingly. I wanted to know which element to use. I am thinking jQuery slider UI.

whatever123
  • 179
  • 1
  • 7
  • Can you provide a jsFiddle? – achudars Jul 18 '13 at 10:04
  • I can't make it work. http://jsfiddle.net/7xQcb/ – whatever123 Jul 18 '13 at 10:47
  • Is there any way you can share an image of how you want it to be? [also you are using canvas for the wave, so make sure you check this post: http://stackoverflow.com/questions/17064913/display-tooltip-in-canvas-graph ] – achudars Jul 18 '13 at 11:04
  • Something like this http://jsfiddle.net/nPKfj/ But I would like to do it the other way round, The div changes the range slider, because I don't like modifying the range slider – whatever123 Jul 18 '13 at 11:28

1 Answers1

2

Q. Which element to use?

A. Use jQuery UI slider

Q. How to make it draggable?

A. Use .draggable() from jQuery UI

Q. How to get the value where I clicked?

A. http://docs.jquery.com/UI/Slider#method-value and check https://stackoverflow.com/a/11032004/1912213

Community
  • 1
  • 1
achudars
  • 1,486
  • 15
  • 25