forked from jquerytools/www
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathedit.htm
More file actions
39 lines (27 loc) · 819 Bytes
/
edit.htm
File metadata and controls
39 lines (27 loc) · 819 Bytes
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
<%-- :mode=jsp: --%>
<%@ include file="plugins/navigator.htm" %>
<c:set var="html">
<div id="newItem" style="display:none">
<div class="added">
<!-- scrollable items can have anything and any amount -->
<img src="http://farm1.static.flickr.com/153/399232237_6928a527c1_t.jpg" />
<img src="http://farm4.static.flickr.com/3089/2796719087_c3ee89a730_t.jpg" />
<h3>New Item</h3>
</div>
</div>
</c:set>
${html}
<script>
<c:set var="actions">
function addItem() {
// get handle to scrollable API
var api = $(".scrollable").data("scrollable");
// use API to add our new item. after the item is being added seek to the end
api.addItem($("#newItem div").clone()).end();
}
</c:set>
${actions}
</script>
<p style="margin:15px 0 0 37px">
<button type="button" onclick="addItem()">add item</button>
</p>