169 lines
4.4 KiB
HTML
169 lines
4.4 KiB
HTML
<!doctype html>
|
|
<html lang="en-GB">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta http-equiv="content-type" content="text/html" charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<meta name="description" content="" />
|
|
<meta name="keyword" content="" />
|
|
|
|
<!-- jquery -->
|
|
<script src="http://cdn.hiimray.co.uk/8206c600-707c-469e-8d49-a76ae35782af/jquery/3.7.0/dist/jquery.min.js"></script>
|
|
<!-- bootstrap -->
|
|
<script src="http://cdn.hiimray.co.uk/8206c600-707c-469e-8d49-a76ae35782af/bootstrap/4.6.2/dist/js/bootstrap.bundle.min.js"></script>
|
|
<link href="http://cdn.hiimray.co.uk/8206c600-707c-469e-8d49-a76ae35782af/bootstrap/4.6.2/dist/css/bootstrap.min.css" rel="stylesheet" />
|
|
|
|
<script src="dist/bstoast4.dist.js"></script>
|
|
<script>
|
|
|
|
function LaunchToast() {
|
|
BSToast4.Create({ Title: 'Hello', Time: 'Some time ago', Message: '<div>Hello momo</div>' });
|
|
}
|
|
|
|
function PushToast() {
|
|
BSToast4.Push({ Title: 'Hello 2', Time: 'Now', Message: '<div>Hello momo<br>Test</div>' });
|
|
}
|
|
|
|
</script>
|
|
<title></title>
|
|
</head>
|
|
<body class="py-5">
|
|
<div class="container">
|
|
|
|
<div class="row mb-3 border-bottom">
|
|
<div class="col-sm-4 border-right">
|
|
<p><b>Example. Simple New Toast</b></p>
|
|
<p>Launch a simple toast with a text body.</p>
|
|
|
|
<p><button id="buttonL1" type="button" class="btn btn-primary">Launch Toast</button></p>
|
|
|
|
<script>
|
|
$(document).ready(function(){
|
|
|
|
$("#buttonL1").on('click', function(){
|
|
BSToast4.Create({
|
|
Title: 'Hello',
|
|
Time: 'Now',
|
|
Message: '<div>Hello momo</div>'
|
|
});
|
|
});
|
|
|
|
});
|
|
</script>
|
|
|
|
</div>
|
|
<div class="col-sm-8">
|
|
|
|
<div class="alert alert-secondary text-sm">
|
|
<pre>
|
|
BSToast4.Create({
|
|
Title: 'Hello',
|
|
Time: 'Now',
|
|
Message: '<div>Hello momo</div>'
|
|
});
|
|
</pre>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row mb-3 border-bottom">
|
|
<div class="col-sm-4 border-right">
|
|
<p><b>Example. Append Toast</b></p>
|
|
<p>Launch a simple toast or append to the last exist toast.</p>
|
|
|
|
<p><button id="buttonL2" type="button" class="btn btn-primary">Push Toast</button></p>
|
|
|
|
<script>
|
|
$(document).ready(function(){
|
|
|
|
$("#buttonL2").on('click', function(){
|
|
BSToast4.Push({
|
|
Title: 'Hello (2)',
|
|
Time: 'Now',
|
|
Message: '<div>Hello, again</div>'
|
|
});
|
|
});
|
|
|
|
});
|
|
</script>
|
|
|
|
</div>
|
|
<div class="col-sm-8">
|
|
|
|
<div class="alert alert-secondary text-sm">
|
|
<pre>
|
|
BSToast4.Push({
|
|
Title: 'Hello (2)',
|
|
Time: 'Now',
|
|
Message: '<div>Hello, again</div>'
|
|
});
|
|
</pre>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row mb-3 border-bottom">
|
|
<div class="col-sm-4 border-right">
|
|
<p><b>Example. Full Toast</b></p>
|
|
<p>Launch a toast with all options.</p>
|
|
|
|
<p><button id="buttonL3" type="button" class="btn btn-primary">Launch Toast</button></p>
|
|
|
|
<script>
|
|
$(document).ready(function(){
|
|
|
|
$("#buttonL3").on('click', function(){
|
|
BSToast4.Create({
|
|
Icon: "",
|
|
Title: "Greetings",
|
|
Time: "Now",
|
|
Message: "Toast Body",
|
|
Footer: "Toast Footer",
|
|
Animation: true,
|
|
AutoHide: true,
|
|
Delay: 6000,
|
|
Position: "position:fixed; top:0; right:80px; margin:20px;",
|
|
MinWidth: 320,
|
|
MinHeight: 200,
|
|
HeaderClass: "bg-light",
|
|
FooterClass: "bg-light text-center"
|
|
});
|
|
});
|
|
|
|
});
|
|
</script>
|
|
|
|
</div>
|
|
<div class="col-sm-8">
|
|
|
|
<div class="alert alert-secondary text-sm">
|
|
<pre>
|
|
BSToast4.Create({
|
|
Icon: "",
|
|
Title: "Greetings",
|
|
Time: "Now",
|
|
Message: "Toast Body",
|
|
Footer: "Toast Footer",
|
|
Animation: true,
|
|
AutoHide: true,
|
|
Delay: 6000,
|
|
Position: "position:fixed; top:0; right:80px; margin:20px;",
|
|
MinWidth: 320,
|
|
MinHeight: 200,
|
|
HeaderClass: "bg-light",
|
|
FooterClass: "bg-light text-center"
|
|
});
|
|
</pre>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</body>
|
|
</html> |