Move bootstrap window

1

I'm using the following code to move bootstrap windows:

$('#divform').modal({ 
    keyboard: false,
    show: true
});
//Jquery draggable
$('#divform').draggable({
    handle: ".modal-header"
});

That is, I have to make use of explicit jquery to move the window, I would like to know if the bootstrap gives this feature without needing jquery.

    
asked by anonymous 17.02.2016 / 13:27

1 answer

1

Bootstrap so far is super dependent on jQuery features. I recommend you go to the site and look for referring plugins for specific cases.

link

But in itself jQuery already have this "raw" functionality (as well as posted by the function itself). But even so, follow the example that is on their own website.

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>jQuery UI Draggable - Default functionality</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
  <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css">
  <style>
  #draggable { width: 150px; height: 150px; padding: 0.5em; }
  </style>
  <script>
  $(function() {
    $( "#draggable" ).draggable();
  });
  </script>
</head>
<body>
 
<div id="draggable" class="ui-widget-content">
  <p>Me arraste!</p>
</div>
 
 
</body>
</html>
    
04.04.2016 / 22:50