Skip to content

Addition of new Draggable Modal feature using the jQuery draggable function #178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 50 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
.marketing p {
font-size: 18px;
}
.drag{
cursor: move;

}
</style>
</head>
<body>
Expand Down Expand Up @@ -117,7 +121,16 @@ <h3>Long Modals</h3>
</div>
</div>
<br />


<!--draggable-->
<div class="stackable">
<h3>Draggable</h3>
<pre class="pre-scrollable prettyprint linenums" data-source="#dragit">
</pre>
<div class="text-center">
<button class="demo btn btn-primary btn-large" data-toggle="modal" href="#dragit">View Demo</button>
</div>
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -192,6 +205,8 @@ <h3>Stack One</h3>
</div>
</div>



<div id="stack2" class="modal hide fade" tabindex="-1" data-focus-on="input:first">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
Expand Down Expand Up @@ -250,6 +265,8 @@ <h3>A Fairly Long Modal</h3>
</div>
</div>



<div id="notlong" class="modal hide fade" tabindex="-1" data-replace="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
Expand Down Expand Up @@ -281,6 +298,28 @@ <h3>A Very Long</h3>
</div>
</div>

<div id="dragit" class="modal hide fade" tabindex="-1" data-focus-on="input:first">
<div class="modal-header drag">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>Draggable Modal</h3>
</div>
<div class="modal-body">
<p>One fine body…</p>
<p>One fine body…</p>
<p>One fine body…</p>
<input type="text" data-tabindex="1" />
<input type="text" data-tabindex="2" />
<button class="btn" data-toggle="modal" href="#stack2">Launch modal</button>
</div>
<div class="modal-footer">
<button type="button" data-dismiss="modal" class="btn">Close</button>
<button type="button" class="btn btn-primary">Ok</button>
</div>
</div>




<div id="ajax-modal" class="modal hide fade" tabindex="-1"></div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript" src="http://getbootstrap.com/2.3.2/assets/js/google-code-prettify/prettify.js"></script>
Expand Down Expand Up @@ -338,6 +377,8 @@ <h3>A Very Long</h3>
});
</script>



<script id="ajax" type="text/javascript">

var $modal = $('#ajax-modal');
Expand Down Expand Up @@ -366,5 +407,13 @@ <h3>A Very Long</h3>
});

</script>

<script>
$(function() {
$( "#dragit" ).draggable();
});
</script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>

</body>
</html>