I am trying to have a jQuery knob widget within a bootstrap panel to be resized automatically when panel itself gets resized (thanks to jQuery UI resizable).
HTML:
<div class="col-md-3">
<div class="panel panel-info dashboard_panel">
<div class="panel-heading">HELLO 2</div>
<div class="panel-body">
<input type="text" class="dial" id="knob1" data-min="-50" data-width="100%" data-height="50%" data-max="50"></input>
<button class="button button-default">Just a button</button>
</div>
</div>
</div>
</div>
JS:
$(".dashboard_panel").resizable();
$(".dial").knob();
CSS:
.dashboard_panel {
min-height: 200px;
}
Here is the link to the code: jsFiddle
I am expecting initial height of the knob widget to be 100 pixels height (50% of 200 pixels minimum height of the parent element), which is not the case. Then I am expecting the height to always be 50% of the size, but it doesn't work neither.
Can someone help me, please ? :)