-
Notifications
You must be signed in to change notification settings - Fork 3
/
cart.js
21 lines (19 loc) · 799 Bytes
/
cart.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function showalert(message, alert_type) {
$("#alert-wrapper").html(`<div class="alert alert-${alert_type} alert-dismissible fade show" role="alert" id="alertdialog">
${message}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>`);
window.setTimeout(function () { $("#alertdialog").alert('close'); }, 2000);
}
window.onload = function () {
var content = this.localStorage.getItem('content');
if (!content) {
this.showalert('Nothing in the cart. Select items from the store to view them here.', 'alert-warning');
}
$("#cards_elem").append(content);
}
function redirect () {
location.href = "file:///home/swaraj/Public/labnetwork/pay.html"
}