开发者

How to get text value in a div vs. an alert modal - jquery

开发者 https://www.devze.com 2022-12-31 13:35 出处:网络
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...

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开发者_JAVA百科({
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());
}
}
});


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());


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

0

精彩评论

暂无评论...
验证码 换一张
取 消