简体   繁体   中英

jQuery Knob won't display correctly

All I get when I use this below is a text box with a number in it..... What did I do wrong ? Aren't I supposed to get the circular bars around it? I've tried every browser none works.

All I get is shown in this picture http://imgur.com/FTa6zBW

I have them included.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript" src="assets/js/jquery.knob.js"></script>



    <input type="text" value="75" class="dial">
    <script>
    $('.dial')
    .trigger(
        'configure',
        {
        "min":10,
        "max":40,
        "fgColor":"#FF0000",
        "skin":"tron",
        "cursor":true
        }
    );
</script>

It appears you require the script in the example code in addition to the script to dynamically configure the knob.

$(".dial").knob({
    'change' : function (v) { console.log(v); }
});

$('.dial').trigger(
    'configure',
    {
        "min":10,
        "max":40,
        "fgColor":"#FF0000",
        "skin":"tron",
        "cursor":true,
    }
);

See fiddle: http://jsfiddle.net/v1gu9cLt/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM