views:

35

answers:

2

Does anyone have an easy way to have text in a div show what's changed in the following statement vs. an alert modal? I can't seem to get my head around it. Thanks...

    $(function(){

            var abc = $('select#percent').selectToUISlider();
                labels: 0
            $('select#valueA, select#valueB').selectToUISlider({
labels: 0,
sliderOptions: {
change:function(e, ui) {
alert('changed'+$('select#valueA option').eq(ui.values[0]).text());
alert('changed'+$('select#valueB option').eq(ui.values[1]).text());
}
}
});
A: 

change your alerts to:

$('div1 selector').html('changed'+$('select#valueA option').eq(ui.values[0]).text());
$('div2 selector').html('changed'+$('select#valueB option').eq(ui.values[1]).text());
derek
rockin' thanks very much! - note to newbs like me - make sure to use $('#dviname') if you want it to appear in a div with that ID.
smudge
A: 

$("div.response").html( ui.value );

Tom