-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
48 lines (41 loc) · 1.26 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!--<link rel="icon" type="image/png" href="resources/newnote.png">-->
<title>middag.biz</title>
<!-- CSS -->
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="foods"></div>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<script>
(function() {
$("#foods").html("");
var URL = "http://nikal.se:8080/icabac";
$.getJSON( URL, {
}).done(function( data ) {
console.log( data );
$.each( data.ingredients, function( i, ingredient ) {
var mystring = "<p>" + ingredient + "</p>";
$("#foods").append(mystring);
/*
$( "<li>" ).attr( "src", ingredient ).appendTo( "#foods" );
if ( i === 3 ) {
return false;
}
*/
});
});
})();
/*
var mystring = '<div data-collectionid="'+coll.getId()+'" class="usercollection';
mystring += (activecollection === coll.getId() ? ' selected' : '');
mystring += '"><button class="deletecollection">x</button><h1 class="lightred">'+coll.getTitle().toUpperCase()+'</h1><h2 class="darkred">'+coll.getSubtitle()+'</h2></div>';
$('#usercollections').append(mystring);
*/
</script>
</body>
</html>