This pull introduces conditional behaviour depending on the bootstrap version, to fix #59.
The bootstrap version is extracted from the $.fn.modal.Constructor.VERSION, as advertised on B3 Documentation.
The modal-header element in the DOM of B4 uses display:flex, and the close button uses negative margins. On the other hand, in B3, the modal-header is a display:block and the close button floats to the right. Thus, in B3 the close button must be before the modal-title, whereas in B4 it must be after.
This pull introduces conditional behaviour depending on the bootstrap version, to fix #59.
The bootstrap version is extracted from the
$.fn.modal.Constructor.VERSION
, as advertised on B3 Documentation.The
modal-header
element in the DOM of B4 usesdisplay:flex
, and the close button uses negative margins. On the other hand, in B3, themodal-header
is adisplay:block
and the close button floats to the right. Thus, in B3 the close button must be before themodal-title
, whereas in B4 it must be after.