Created
March 18, 2017 22:11
-
-
Save dk-ok/a01bc1d63252cfded49fdded91cd0122 to your computer and use it in GitHub Desktop.
Bootstrap draggable, resizable model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".modal").appendTo("body"); | |
//http://api.jqueryui.com/resizable/ | |
$('.modal-content.resizable').resizable({ | |
alsoResize: ".modal-header, .modal-body, .modal-footer" | |
}); | |
$('.modal.draggable').draggable({ | |
handle: ".modal-header", | |
cursor: 'move', | |
}); | |
$(window).resize(function(e) { | |
//reset modal draggables so we can find them | |
var d = $('.modal.draggable'); | |
d.css("left", 0); | |
d.css("top", 0); | |
}); | |
//Add css | |
//$('.modal.draggable>.modal-dialog>.modal-content>.modal-header').css('cursor', 'move'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment