javascript - Bootstrap Input Group not rendering correctly inside jQuery UI dialog -
i have number field 2 buttons on each side of increment/decrement. renders fine when not in jquery ui dialog , so:
outside of jquery dialog:
inside jquery dialog:
code:
html:
<div class="form-group"> <div class="col-sm-8"> <div class="input-group"> <div class="input-group-btn"> <button class="btn btn-default" data-type="increment_filealertmins"> <i class="glyphicon glyphicon-plus"> </i> </button> </div> <input type="number" class="form-control" required id="filealertmins" name="filealertmins" placeholder="enter filealertmins"/> <div class="input-group-btn"> <button class="btn btn-default" data-type="decrement_filealertmins"> <i class="glyphicon glyphicon-minus"> </i> </button> </div> </div> </div> </div>
js:
$(function() { $(".form-group").dialog(); // comment out see working properly! })
reproducible fiddle:
here go solution https://jsfiddle.net/qr2zc4nj/2/
$(function(){ $(".form-group").dialog(); })
.glyphicon{ font-size: 20px; }
<link href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet"/> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <div class="form-group"> <label class="control-label col-sm-3" for="filealertmins"> filealertmins: </label> <div class="col-sm-8"> <div class="input-group"> <div class="input-group-btn"> <button class="btn btn-default" data-type="increment_filealertmins"> <i class="glyphicon glyphicon-plus"> </i> </button> </div> <input type="number" class="form-control" required id="filealertmins" name="filealertmins" placeholder="enter filealertmins"/> <div class="input-group-btn"> <button class="btn btn-default" data-type="decrement_filealertmins"> <i class="glyphicon glyphicon-minus"> </i> </button> </div> </div> </div> </div>
you need add font-size
.glyphicon
.
hope you.
Comments
Post a Comment