简体   繁体   中英

Jquery Knob Change Size on Browser Resize

i'm currently looking for an solution to change the size of my Jquery Knob Chart when the user resize the browser. Till now i only found a solution : reload the site on Resize and check Browser width and set the height and width based on this. But this won't work correctly on Smartphones. Maybe you have an idea?

Haven't tested this on a smartphone, but to make a knob responsive, you should add data-width attribute to its element.

An example:

<input class="knob" data-width="50%" value="35">

You can find another example in jQuery Knob's github .

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