Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //this makes elements with the draggable class draggable
- <script>
- $( function() {
- $( ".draggable" ).draggable();
- } );
- //this inserts a draggable div on page load, will conert this to a button
- //call function later once i get inserting draggable divs working
- $(document).ready(function(){
- $('#Container').append($("<div class='draggable'> This should be draggable</div>"));
- });
- </script>
- </head>
- <body>
- <!-- Putting divs inside this Container --->
- <div id="Container" style="border:solid; width:500px; height:500px;">
- </div>
- $(document).ready(function(){
- $('#Container').append($("<div class='draggable'> This should be draggable</div>"));
- $(".draggable").draggable();
- });
Add Comment
Please, Sign In to add comment