-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbeli-ipon.html
305 lines (269 loc) · 12.6 KB
/
beli-ipon.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Tokopedia</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="https://use.fontawesome.com/dc277a8208.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div id="mainwrapper">
<div id="mainwrapper-inner">
<div class="container-fluid utama">
<!-- navbar utama -->
<nav class="navbar navbar-fixed-top navigasi">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand logonav" href="index.html">tokopedia</a>
</div>
<div class="step">
<span class="step-name">ISI DATA PEMBELIAN</span>
<div class="step-cont"><span class="step-name">METODE PEMBAYARAN</span> </div>
<div class="step-cont"><span class="step-name">KONFIRMASI PEMBELIAN</span> </div>
</div>
</div>
</nav>
<div class="row">
<div class="form-beli">
<div class="panel with-nav-tabs panel-success">
<div class="panel-heading">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab1success" data-toggle="tab">Beli tanpa Daftar</a></li>
<li><a href="#tab2success" data-toggle="tab">Login</a> </li>
</ul>
</div>
<div class="panel-body">
<div class="tab-content">
<div class="tab-pane fade in active" id="tab1success">
<div class="form">
<div class="col-md-8">
<div class="row">
<img src="img/ipon.png" alt="" class="barang"><h3>iPhone 6</h3>
</div>
<div class="row">
<div class="form-group" id="jml">
<label for="jml">Jumlah:</label>
<div class="input-group jml">
<span class="input-group-btn">
<button type="button" class="btn btn-default btn-number" disabled="disabled" data-type="minus" data-field="quant[1]">
<span class="glyphicon glyphicon-minus"></span>
</button>
</span>
<input type="text" name="quant[1]" class="form-control input-number" value="1" min="1" max="10">
<span class="input-group-btn">
<button type="button" class="btn btn-default btn-number" data-type="plus" data-field="quant[1]">
<span class="glyphicon glyphicon-plus"></span>
</button>
</span>
</div>
</div>
<div class="form-group harga">
<h5>Harga</h5>
<p>Rp 8 987 899</p>
</div>
<div class="form-group">
<label for="ket">Keterangan:</label><br>
<textarea id="ket" placeholder="ukuran, warna, lain-lain">
</textarea>
</div>
</div>
<div class="row">
<div class="form-group">
<label for="alamat-as">Simpan alamat sebagai:</label><br>
<input type="text" id="alamat-as" placeholder="alamat rumah, alamat teman, lain-lain">
</div>
</div>
<div class="row">
<div class="form-group">
<label for="nama">Nama penerima:</label><br>
<input type="text" id="nama">
</div>
<div class="form-group">
<label for="nohp">No HP penerima:</label><br>
<input type="text" id="nohp">
</div>
<div class="form-group">
<label for="kdpos">Kode Pos:</label><br>
<input type="text" id="kdpos">
</div>
</div>
<div class="row">
<div class="form-group">
<label for="sel1">Provinsi:</label>
<select class="form-control" id="sel1">
<option>Yogyakarta</option>
<option>Jawa Tengah</option>
<option>Jawa Timur</option>
<option>Jawa Barat</option>
</select>
</div>
<div class="form-group">
<label for="sel2">Kabupaten:</label>
<select class="form-control" id="sel2">
<option>Sleman</option>
<option>Bantul</option>
<option>Kulonprogo</option>
<option>Yogyakarta</option>
</select>
</div>
<div class="form-group">
<label for="sel3">Kecamatan:</label>
<select class="form-control" id="sel3">
<option>Banguntapan</option>
<option>Depok</option>
<option>Wonosari</option>
<option>Yogyakarta</option>
</select>
</div>
</div>
<div class="row">
<div class="form-group">
<label for="al-lg">Alamat Lengkap:</label><br>
<textarea id="al-lg">
</textarea>
</div>
</div>
<div class="row">
<div class="form-group">
<label for="sel4">Kurir:</label>
<select class="form-control" id="sel5">
<option>JNE</option>
<option>POS</option>
<option>GOJEK</option>
</select>
</div>
<div class="form-group">
<label for="sel6">Paket Pengiriman:</label>
<select class="form-control" id="sel6">
<option>YES</option>
<option>OKE</option>
<option>KILAT</option>
</select>
</div>
<div class="form-group">
<h5>Biaya Asuransi</h5>
<p>Rp 2 000</p>
</div>
<div class="form-group">
<h5>Ongkos Kirim</h5>
<p>Rp 2 000</p>
</div>
</div>
<div class="row">
<h4>Subtotal</h4>
<p class="subt">Rp 8 989 899</p>
</div>
<div class="row">
<button class="btn btn-primary btn-block">BELI</button>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="tab2success">
<div class="masuk beli">
<p>Belum punya akun? Daftar <a href="daftar.html">di sini</a></p>
<form>
<div class="form-group">
<label for="eml">Email:</label>
<input type="text" class="form-control" id="eml">
</div>
<br>
<div class="form-group">
<label for="pwd">Kata sandi:</label>
<input type="password" class="form-control" id="pwd">
</div>
<button class="btn btn-block btn-primary" id="dft">Masuk</button>
<div class="garishr"></div>atau <div class="garishr"></div>
<button class="btn btn-block btn-primary" id="fb"><i class="fa fa-facebook" aria-hidden="true"></i> Masuk dengan Facebook</button>
<button class="btn btn-block btn-primary" id="G"><i class="fa fa-google-plus" aria-hidden="true"></i> Masuk dengan Google</button>
<button class="btn btn-block btn-primary" id="Y"><i class="fa fa-yahoo" aria-hidden="true"></i> Masuk dengan Yahoo</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
<script>
$('.btn-number').click(function(e){
e.preventDefault();
fieldName = $(this).attr('data-field');
type = $(this).attr('data-type');
var input = $("input[name='"+fieldName+"']");
var currentVal = parseInt(input.val());
if (!isNaN(currentVal)) {
if(type == 'minus') {
if(currentVal > input.attr('min')) {
input.val(currentVal - 1).change();
}
if(parseInt(input.val()) == input.attr('min')) {
$(this).attr('disabled', true);
}
} else if(type == 'plus') {
if(currentVal < input.attr('max')) {
input.val(currentVal + 1).change();
}
if(parseInt(input.val()) == input.attr('max')) {
$(this).attr('disabled', true);
}
}
} else {
input.val(0);
}
});
$('.input-number').focusin(function(){
$(this).data('oldValue', $(this).val());
});
$('.input-number').change(function() {
minValue = parseInt($(this).attr('min'));
maxValue = parseInt($(this).attr('max'));
valueCurrent = parseInt($(this).val());
name = $(this).attr('name');
if(valueCurrent >= minValue) {
$(".btn-number[data-type='minus'][data-field='"+name+"']").removeAttr('disabled')
} else {
alert('Sorry, the minimum value was reached');
$(this).val($(this).data('oldValue'));
}
if(valueCurrent <= maxValue) {
$(".btn-number[data-type='plus'][data-field='"+name+"']").removeAttr('disabled')
} else {
alert('Sorry, the maximum value was reached');
$(this).val($(this).data('oldValue'));
}
});
$(".input-number").keydown(function (e) {
// Allow: backspace, delete, tab, escape, enter and .
if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 190]) !== -1 ||
// Allow: Ctrl+A
(e.keyCode == 65 && e.ctrlKey === true) ||
// Allow: home, end, left, right
(e.keyCode >= 35 && e.keyCode <= 39)) {
// let it happen, don't do anything
return;
}
// Ensure that it is a number and stop the keypress
if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
e.preventDefault();
}
});
</script>
</body>
</html>