Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97170635
edit.html
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Jan 3, 03:37
Size
2 KB
Mime Type
text/html
Expires
Sun, Jan 5, 03:37 (2 d)
Engine
blob
Format
Raw Data
Handle
23343803
Attached To
R3600 invenio-infoscience
edit.html
View Options
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<meta
http-equiv=
"content-type"
content=
"text/html; charset=iso-8859-1"
/>
<title>
jQuery treeview
</title>
<link
rel=
"stylesheet"
href=
"../jquery.treeview.css"
/>
<link
rel=
"stylesheet"
href=
"screen.css"
/>
<script
src=
"../lib/jquery.js"
type=
"text/javascript"
></script>
<script
src=
"../lib/jquery.cookie.js"
type=
"text/javascript"
></script>
<script
src=
"../jquery.treeview.js"
type=
"text/javascript"
></script>
<script
src=
"../jquery.treeview.edit.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
>
$
(
function
()
{
$
(
"#browser"
).
treeview
();
$
(
"#add"
).
click
(
function
()
{
var
branches
=
$
(
"<li><span class='folder'>New Sublist</span><ul>"
+
"<li><span class='file'>Item1</span></li>"
+
"<li><span class='file'>Item2</span></li></ul></li>"
).
appendTo
(
"#browser"
);
$
(
"#browser"
).
treeview
({
add
:
branches
});
branches
=
$
(
"<li class='closed'><span class='folder'>New Sublist</span><ul><li><span class='file'>Item1</span></li><li><span class='file'>Item2</span></li></ul></li>"
).
prependTo
(
"#folder21"
);
$
(
"#browser"
).
treeview
({
add
:
branches
});
});
$
(
"#browser"
).
bind
(
"contextmenu"
,
function
(
event
)
{
if
(
$
(
event
.
target
).
is
(
"li"
)
||
$
(
event
.
target
).
parents
(
"li"
).
length
)
{
$
(
"#browser"
).
treeview
({
remove
:
$
(
event
.
target
).
parents
(
"li"
).
filter
(
":first"
)
});
return
false
;
}
});
})
</script>
</head>
<body>
<h1
id=
"banner"
><a
href=
"http://bassistance.de/jquery-plugins/jquery-plugin-treeview/"
>
jQuery Treeview Plugin
</a>
Demo
</h1>
<div
id=
"main"
>
<a
href=
"."
>
Main Demo
</a>
<h4>
Sample 1 - default, right-click to remove items
</h4>
<button
id=
"add"
>
Add!
</button>
<ul
id=
"browser"
class=
"filetree"
>
<li><span
class=
"folder"
>
Folder 1
</span>
<ul>
<li><span
class=
"file"
>
Item 1.1
</span></li>
</ul>
</li>
<li><span
class=
"folder"
>
Folder 2
</span>
<ul>
<li><span
class=
"folder"
>
Subfolder 2.1
</span>
<ul
id=
"folder21"
>
<li><span
class=
"file"
>
File 2.1.1
</span></li>
<li><span
class=
"file"
>
File 2.1.2
</span></li>
</ul>
</li>
<li><span
class=
"file"
>
File 2.2
</span></li>
</ul>
</li>
<li
class=
"closed"
><span
class=
"folder"
>
Folder 3 (closed at start)
</span>
<ul>
<li><span
class=
"file"
>
File 3.1
</span></li>
</ul>
</li>
<li><span
class=
"file"
>
File 4
</span></li>
</ul>
</div>
</body></html>
Event Timeline
Log In to Comment