Skip to content

Instantly share code, notes, and snippets.

@dk-ok
Created March 18, 2017 22:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dk-ok/a01bc1d63252cfded49fdded91cd0122 to your computer and use it in GitHub Desktop.
Save dk-ok/a01bc1d63252cfded49fdded91cd0122 to your computer and use it in GitHub Desktop.
Bootstrap draggable, resizable model
$(".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