Range slider?

19 views
Skip to first unread message

Nevin

unread,
Jun 29, 2011, 3:36:11 AM6/29/11
to RightJS
Is the current slider widget able to support a range selection mode?

What I want is to have two handles to specify a selected range instead
of one handle for a value. :-)

Nikolay Nemshilov

unread,
Jun 29, 2011, 3:50:56 AM6/29/11
to rig...@googlegroups.com
Hi Nevin,

Nope, no such thing yet

--
Nik

> --
> You received this message because you are subscribed to the Google Groups "RightJS" group.
> To post to this group, send email to rig...@googlegroups.com.
> To unsubscribe from this group, send email to rightjs+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rightjs?hl=en.
>

Nevin

unread,
Jun 30, 2011, 3:37:54 AM6/30/11
to RightJS
I just patched the slider widget to provide a range type slider.

I haven't extensively tested it though. Please take a look at the pull
request at github

-- Nevin

Nikolay Nemshilov

unread,
Jun 30, 2011, 4:55:40 AM6/30/11
to rig...@googlegroups.com
Hey Nevin,

Thanks for the patch! I'll check and publish it on the weekend

--
Nik

--
Nikolay V. Nemshilov
The Web-Developer

Avol

unread,
Jul 29, 2011, 8:08:41 AM7/29/11
to RightJS
What about range slider widget?

I tried to use it, and found an error:
e2val: function(event, type) {
...
if (type === undefined) {
should be something like this:
if (type === undefined || type === null) {
> > For more options, visit this group athttp://groups.google.com/group/rightjs?hl=en.

Avol

unread,
Jul 29, 2011, 8:25:50 AM7/29/11
to RightJS
Doesn't work click on slider bar.
Can be assigned only to one input field.
It's not yet ready for use ((

Nevin Ng

unread,
Jul 29, 2011, 2:43:55 PM7/29/11
to rig...@googlegroups.com
It works for me with the following testing code:


<!DOCTYPE html>

<html>
<head>
<script type="text/javascript" src="util/right.js"></script>
<script type="text/javascript" src="build/right-slider-src.js"></script>
</head>

<body>
<p>Slider Test</p>

<div id="slider" class="rui-slider" data-slider="{min:0, max:100, update:'slider-input', range: true, round: 2}">
<div class="level"></div>
<div class="handle from"></div>
<div class="handle to"></div>
</div>

<p id="slider-value"></p>

<script type="text/javascript">
$(document).onReady(function() {
var theSlider = $('slider');
$('slider').on('change', function(data) {
if (data.values !== null) {
$('slider-value').html("from: " + data.values[0] + " to: " + data.values[1]);
}
});
});
</script>
</body>
</html>

Avol

unread,
Jul 30, 2011, 5:26:23 AM7/30/11
to RightJS
Without this:
if (type === undefined || type === null) {
i can't use regular slider.

I think it should be possible to specify a second input-field to be
updated.
When I click on the slider bar, he does something strange.
Reply all
Reply to author
Forward
0 new messages