-
Notifications
You must be signed in to change notification settings - Fork 21
/
example.html
51 lines (40 loc) · 1.35 KB
/
example.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
43
44
45
46
47
48
49
50
51
<html>
<head>
<!-- include stylesheet -->
<link type="text/css" rel="stylesheet" href="jquery.fileManager.css" />
<!-- include required jQuery + jQueryUI -->
<link type="text/css" rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1/themes/redmond/jquery-ui.css" />
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
<script type="text/javascript" src="jquery.fileManager.js"></script>
</head>
<body>
<h1>jQuery.fileManager</h1>
<h2>Simple</h2>
<!-- create the container -->
<div id="filemanager"></div>
<!-- initialise the script, passing the path to the php script -->
<script type="text/javascript">
$('#filemanager').fileManager({ajaxPath:'fileManager.php'});
</script>
<h2>Simple with upload</h2>
<div id="filemanager_upload"></div>
<script type="text/javascript">
$('#filemanager_upload').fileManager({ajaxPath:'fileManager.php',upload:true});
</script>
<h2>Simple with events</h2>
<div id="filemanager_events"></div>
<script type="text/javascript">
$('#filemanager_events').fileManager({
ajaxPath:'fileManager.php',
upload:true,
events:{
click: function() {
var data = $(this).data();
alert(data.item.title + ' = ' + data.item.fullPath);
}
}
});
</script>
</body>
</html>