-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
58 lines (53 loc) · 2.34 KB
/
index.html
File metadata and controls
58 lines (53 loc) · 2.34 KB
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
52
53
54
55
56
57
58
<!doctype html>
<html>
<head>
<title>Song Search</title>
<link rel="stylesheet" href="main.css">
<link rel="icon" href="src/music.png">
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script src="http://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="script.js"></script>
</head>
<body ng-app="myApp" ng-controller="songCtrl">
<img id="backimg" src="src/ituneslogo.png" alt="itunes logo" width="500">
<div id="history">
<h1>iTunes Song Search</h1>
<form ng-submit="songAdd()">
<input type="text" ng-model="songInput" size="50" placeholder="Coldwater">
<input type="submit" value="Search Song">
</form>
<h2>Search History</h2>
<br>
<div class="hp_slide">
<div class="hp_range"></div>
</div>
<div id="results" ng-repeat="x in songList">
<table>
<tbody>
<tr class="">
<td id="tdplay" style="width: 800px;" ng-bind="x.songText"></td>
<td align="right" class="play" ng-click="toggle($index)"><img src="src/plainicon.com-40678-512px.png"></td>
<td align="right" class="pause" ng-click="toggle($index)"><img src="src/plainicon.com-42677-512px.png"></td>
</tr>
</tbody>
</table>
</div>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('songCtrl', function($scope) {
$scope.songList = [];
$scope.songAdd = function() {
$scope.songList.push({songText:$scope.songInput});
$scope.songInput = "";
};
$scope.toggle = function(index) {
togglePlay($scope.songList[index].songText);
}
});
</script>
<audio controls id="aud" style="display:none">
<source src="" type="audio/mpeg">
</audio>
</body>
</html>