开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜