Site Skeleton
This commit is contained in:
27
mdb/js/modules/enhanced-modals.js
Executable file
27
mdb/js/modules/enhanced-modals.js
Executable file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
Enhanced Bootstrap Modals
|
||||
https://mdbootstrap.com
|
||||
office@mdbootstrap.com
|
||||
*/
|
||||
|
||||
(function($){
|
||||
$('body').on('shown.bs.modal', '.modal', function() {
|
||||
if(!$('.modal-backdrop').length) {
|
||||
|
||||
$modal_dialog = $(this).children('.modal-dialog')
|
||||
|
||||
if($modal_dialog.hasClass('modal-side')) {
|
||||
$(this).addClass('modal-scrolling');
|
||||
$('body').addClass('scrollable');
|
||||
}
|
||||
|
||||
if($modal_dialog.hasClass('modal-frame')) {
|
||||
$(this).addClass('modal-content-clickable');
|
||||
$('body').addClass('scrollable');
|
||||
}
|
||||
}
|
||||
});
|
||||
$('body').on('hidden.bs.modal', '.modal', function() {
|
||||
$('body').removeClass('scrollable');
|
||||
});
|
||||
})(jQuery);
|
Reference in New Issue
Block a user