Jsfiddle wont work locally
I can“t get this Jsfiddle to work on my computer:
http://jsfiddle.net/v685v9t6/1024/
I have tried this:
- <html>
- <html>
- <head>
- <script type="text/javascript" src="//code.jquery.com/jquery-2.0.2.js"></script>
- <script type="text/javascript" src="//code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
-
-
- <link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
-
- <style type="text/css">
- .draggable {
- width: 90px;
- height: 90px;
- padding: 0.5em;
- float: left;
- margin: 0 10px 10px 0;
- }
- #draggable, #draggable2 {
- margin-bottom:20px;
- }
- #draggable {
- cursor: n-resize;
- }
- #draggable3 {
- cursor: move;
- }
- #containment-wrapper {
- width: 700px;
- height:500px;
- border:1px solid #000;
- padding: 5px;
- }
- h3 {
- clear: left;
- }
- </style>
- <script>
- var sPositions = localStorage.positions || "{}",
- positions = JSON.parse(sPositions);
- $.each(positions, function (id, pos) {
- $("#" + id).css(pos)
- })
- $("#draggable3").draggable({
- containment: "#containment-wrapper",
- scroll: false,
- stop: function (event, ui) {
- positions[this.id] = ui.position
- localStorage.positions = JSON.stringify(positions)
- }
- });
- </script>
-
- </head>
- <body>
-
- <div id="containment-wrapper">
- <div id="draggable3" class="draggable ui-widget-content">
- <p>DRAG ME</p>
- </div>
- </body>
- </html>