forked from ethaizone/Bootstrap-Confirmation
-
Notifications
You must be signed in to change notification settings - Fork 4
/
test.html
50 lines (47 loc) · 1.81 KB
/
test.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
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<title>Bootstrap3-Confirmation test page</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-12">
<h1>Basic usage with default options</h1>
<pre>$('[data-toggle="confirmation"]').confirmation();</pre>
<h2>Demo</h2>
<a href="#" class="btn btn-default" data-toggle="confirmation">Test me !</a>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h1>With callback function <code>onConfirm</code> and <code>onCancel</code> button</h1>
<pre>$('[data-toggle="confirmation-callback"]').confirmation({
onConfirm: function() {alert('confirm callback');},
onCancel: function() {alert('cancel callback');}
});</pre>
<h2>Demo</h2>
<a href="#" class="btn btn-default" data-toggle="confirmation-callback">Test me !</a>
</div>
</div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<script src="bootstrap3-confirmation.js"></script>
<script>
$('[data-toggle="confirmation"]').confirmation();
$('[data-toggle="confirmation-callback"]').confirmation({
onConfirm: function() {alert('confirm callback');},
onCancel: function() {alert('cancel callback');}
});
</script>
</body>
</html>