Resizable bootstrap modals
Resizable bootstrap modals
gbenett
Posts: 14Questions: 5Answers: 0
Editor's bootstrap display option looks and works great, including modals. By default bs modals are fixed size/position, but a little research reveals it should be possible to make them resizable and draggable with the following jQuery UI functions:
$('.modal-content').resizable({
//alsoResize: ".modal-dialog",
//minHeight: 150
});
$('.modal-dialog').draggable();
$('#myModal').on('show.bs.modal', function () {
$(this).find('.modal-body').css({
'max-height':'100%'
});
});
Unfortunately this isn't working with Editor. Modals appear, but ignore the above script. Any chance there's a known workaround? Thanks!
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Try
$.fn.dataTable.Editor.display.bootstrap.node()
to get the modal element Editor's Bootstrap display uses. You can then use that to attach the various other libraries you need.Regards,
Allan
Beautiful. The modal is the firstChild of the Bootstrap node. Attaching jQuery widgets to that does the trick.