How to get value from jQuery UI slider?

atinder picture atinder · May 30, 2010 · Viewed 95.6k times · Source

I am working on http://gamercity.info/ymusic/. And I am using UI slider as seek bar. While the video is played I want to invoke a seekTo(seconds) function if user clicked anywhere on the seek bar. How to get new value of seconds after click event?

Answer

chad.mellor picture chad.mellor · Jun 14, 2012

To read slider value/percentage value at anytime:

var val = $('#slider').slider("option", "value");