-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheditor.htm
40 lines (30 loc) · 1.01 KB
/
editor.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!doctype html><html lang=en><body>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script>
<span id=button>+</span>
<style>
.box{background:green;top:0;left:0;position:absolute;display:inline;}
.box textarea{margin-top:20px;height:20px;}
.terminal{padding-top:10px;position:absolute;display:inline;background:pink;}
</style>
<script>(function(){
var files = [];
var terminal = function(){
var newdiv = $('<div class=terminal><pre></pre><textarea></textarea></div>');
$(document.body).append(newdiv);
$(newdiv).draggable();
};
var file = function(){
var newdiv = $("<div class='box'><textarea></textarea></div>");
$(document.body).append(newdiv);
$(newdiv).draggable();
};
var s = document.getElementsByTagName('script')[0];
$("#button").click(function(){
//new file();
new terminal();
});
setTimeout(1000,function(){
;
});
})();</script>