-
Notifications
You must be signed in to change notification settings - Fork 5
/
demo.html
42 lines (37 loc) · 861 Bytes
/
demo.html
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
41
42
<html>
<head>
<title>File Input Drop Zone Demo</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript" src="file-input-drop-zone.js"></script>
<script type="text/javascript">
$(function() {
$('.second-zone').fileInputDropZone({
selectImg: function($dropZone) { return $dropZone.find('.preview'); }
});
});
</script>
<style type="text/css">
.file-input-drop-zone, .second-zone {
float: left;
height: 15em;
width: 15em;
border: 1px dotted grey;
overflow: hidden;
}
.preview {
height: 10em;
width: 10em;
}
</style>
</head>
<body>
<div class="file-input-drop-zone">
<input type="file">
<img />
</div>
<div class="second-zone">
<input type="file">
<div class="preview"> </div>
</div>
</body>
</html>