I would like to be able to move around (on the greyed-out background, by dragging and dropping) the modal form that is provided by Bootstrap 2. Can anyone tell me what the best practice for achieving this is?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The bootstrap doesn’t come with any dragging and dropping functionality by default, but you can add a little jQuery UI spice into the mix to get the effect you’re looking for. For example, using the
draggableinteraction from the framework you can target your modal ID to allow it to be dragged around within the modal backdrop.Try this:
JS
Demo, edit here.
Update: bootstrap3 demo