tags:

views:

36

answers:

1

I am trying to find a slider or a toggle for my application that allows the user to select yes or no and its harder then i thought to track one down...

I found this slider but its 1 or 2 numeric and not yes or no text...any suggestions

+4  A: 

we could edit it to have something like this,

$(function() {
    $("#slider-range-max").slider({
        range: "max",
        min: 0,
        max: 1,
        value: 0,
        slide: function(event, ui) {
            $("#amount").val(ui.value?'Yes':'No');
        }
    });
    $("#amount").val($("#slider-range-max").slider("value")?'Yes':'No');
});​

crazy demo

Reigel
How do you make the demo "go both ways?" xD
Cryo
@Cryo - Excuse me?
Reigel
awesome thanks but do you know how to size this slider
Matt
He means you need a third setting in the middle for Bi
tandu
@Matt - look at Theming tab in [jqueryui slider](http://jqueryui.com/demos/slider/)
Reigel
@Cryo, @tandu - you mean like [this](http://jsfiddle.net/qESzA/)?
Reigel
@Reigel - Hahaha. Excellent.
Cryo