forked from pearlchen/LLC-JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjquery-javascript.html
More file actions
36 lines (29 loc) · 1.14 KB
/
jquery-javascript.html
File metadata and controls
36 lines (29 loc) · 1.14 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>jQuery and JavaScript</title>
<meta charset="utf-8">
</head>
<body>
<div id="exercise2" style="text-align: center;">
<img src="http://brennaobrien.com/LLC-JavaScript/exercises/assets/plush-android.jpg" width="195" height="195" />
<br />
<!-- remove onclick and replace with jQuery's click event using the class name-->
<button class="add" onclick="addItem();">Add</button>
<button class="removeItem" onclick="removeItem();">Remove</button>
<br />
Quantity
<input type="text" id="updateQuantity" value="0" readonly style="text-align:center; width: 20px; border: 1px solid #ccc;"/>
<br />
<br />
Total Cost:
<input type="text" id="updateTotal" value="" readonly style="border: 1px solid #ccc;"/>
<br />
<br />
<!-- remove onclick and replace with jQuery's click event -->
<button class="checkout" onclick="checkout();">Check out now!</button>
</div>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="jquery-javascript.js"></script>
</body>
</html>