Oh, and if you have any future questions about jQuery UI plugins, note
there's a separate list for those:
http://groups.google.com/group/jquery-ui

<http://groups.google.com/group/jquery-ui>- Richard

On Fri, Oct 16, 2009 at 8:28 AM, Richard D. Worth <rdwo...@gmail.com> wrote:

> Something like this perhaps:
>
> http://jsbin.com/enuxu
> source code: http://jsbin.com/enuxu/edit
>
> - Richard
>
>
> On Wed, Oct 14, 2009 at 2:28 PM, DekiR <roncevic.de...@gmail.com> wrote:
>
>>
>> HI,
>>
>> I am new to jquery and I am trying to calculate a value based on two
>> sliders.
>>
>> Can somebody help me or point me into the right direction.
>>
>> Thanks,
>>
>> DekiR
>>
>>
>>
>> This is the code that I am using:
>>
>>
>>        var value1;
>>        var value2;
>>
>>        $(function() {
>>                $("#slider").slider({
>>                        value:0,
>>                        min: -100,
>>                        max: 100,
>>                        step: 1,
>>                        slide: function(event, ui) {
>>
>>                                $("#amount_t").val(ui.value);
>>
>>                                var sl1 = parseFloat(ui.value / 100) *
>> parseFloat($("#rate").attr
>> ("value"));
>>
>>                                $("#amount1_t").val(sl1);
>>
>>                                value1 = sl1;
>>
>>                        }
>>
>>                });
>>
>>
>>                $("#slider1").slider({
>>                        value:0,
>>                        min: -100,
>>                        max: 100,
>>                        step: 1,
>>                        slide: function(event, ui) {
>>
>>                                $("#amount_b").val(ui.value);
>>
>>                                var sl2 = parseFloat(ui.value / 100) *
>> parseFloat($("#rate").attr
>> ("value"));
>>
>>                                $("#amount1_b").val(sl2);
>>
>>                                value2 = sl2;
>>
>>                        }
>>
>>                });
>>
>>
>>                var calc = parseFloat(value1) + parseFloat(value2);
>>
>>                $("#total").val(calc);
>>
>>        });
>>
>
>

Reply via email to