Skip to content

Commit bc2bf89

Browse files
committed
Monte-carlo simulation page modifed
1 parent c126d72 commit bc2bf89

File tree

3 files changed

+118
-0
lines changed

3 files changed

+118
-0
lines changed

Monte-carlo-simulations-Basics.html

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,26 @@
107107
border-bottom: 0 solid transparent;
108108
}
109109

110+
/* Style for the "Back to Top" button */
111+
#myBtn {
112+
display: none;
113+
position: fixed;
114+
bottom: 20px;
115+
right: 30px;
116+
z-index: 99;
117+
font-size: 18px;
118+
border: none;
119+
outline: none;
120+
background-color: red;
121+
color: white;
122+
cursor: pointer;
123+
padding: 15px;
124+
border-radius: 4px;
125+
}
126+
127+
#myBtn:hover {
128+
background-color: #555;
129+
}
110130
/*
111131
* Lumino
112132
*/
@@ -9534,11 +9554,36 @@ <h2 id="Reference">Reference<a class="anchor-link" href="#Reference">¶</a></h2>
95349554

95359555
</main>
95369556
<button class="back-button" onclick="goBack()">Back to Previous Page</button>
9557+
<button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
9558+
95379559

95389560
<script>
95399561
function goBack() {
95409562
window.history.back();
95419563
}
95429564
</script>
9565+
9566+
<script>
9567+
// Get the button
9568+
let mybutton = document.getElementById("myBtn");
9569+
9570+
// When the user scrolls down 20px from the top of the document, show the button
9571+
window.onscroll = function() {scrollFunction()};
9572+
9573+
function scrollFunction() {
9574+
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
9575+
mybutton.style.display = "block";
9576+
} else {
9577+
mybutton.style.display = "none";
9578+
}
9579+
}
9580+
9581+
// When the user clicks on the button, scroll to the top of the document
9582+
function topFunction() {
9583+
document.body.scrollTop = 0;
9584+
document.documentElement.scrollTop = 0;
9585+
}
9586+
</script>
9587+
95439588
</body>
95449589
</html>

market-risk.html

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,6 +1374,27 @@
13741374
flex: 1 1 auto;
13751375
}
13761376

1377+
/* Style for the "Back to Top" button */
1378+
#myBtn {
1379+
display: none;
1380+
position: fixed;
1381+
bottom: 20px;
1382+
right: 30px;
1383+
z-index: 99;
1384+
font-size: 18px;
1385+
border: none;
1386+
outline: none;
1387+
background-color: red;
1388+
color: white;
1389+
cursor: pointer;
1390+
padding: 15px;
1391+
border-radius: 4px;
1392+
}
1393+
1394+
#myBtn:hover {
1395+
background-color: #555;
1396+
}
1397+
13771398
/*-----------------------------------------------------------------------------
13781399
| Copyright (c) Jupyter Development Team.
13791400
| Distributed under the terms of the Modified BSD License.
@@ -7998,5 +8019,36 @@ <h4 id="Consulsion:">Consulsion:<a class="anchor-link" href="#Consulsion:">¶</a
79988019
</div>
79998020
</div>
80008021
</main>
8022+
<button class="back-button" onclick="goBack()">Back to Previous Page</button>
8023+
<button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
8024+
8025+
8026+
<script>
8027+
function goBack() {
8028+
window.history.back();
8029+
}
8030+
</script>
8031+
8032+
<script>
8033+
// Get the button
8034+
let mybutton = document.getElementById("myBtn");
8035+
8036+
// When the user scrolls down 20px from the top of the document, show the button
8037+
window.onscroll = function() {scrollFunction()};
8038+
8039+
function scrollFunction() {
8040+
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
8041+
mybutton.style.display = "block";
8042+
} else {
8043+
mybutton.style.display = "none";
8044+
}
8045+
}
8046+
8047+
// When the user clicks on the button, scroll to the top of the document
8048+
function topFunction() {
8049+
document.body.scrollTop = 0;
8050+
document.documentElement.scrollTop = 0;
8051+
}
8052+
</script>
80018053
</body>
80028054
</html>

styles.css

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,4 +416,25 @@ td:first-child {
416416
}
417417
.back-button:hover {
418418
background-color: #0056b3;
419+
}
420+
421+
/* Style for the "Back to Top" button */
422+
#myBtn {
423+
display: none;
424+
position: fixed;
425+
bottom: 20px;
426+
right: 30px;
427+
z-index: 99;
428+
font-size: 18px;
429+
border: none;
430+
outline: none;
431+
background-color: red;
432+
color: white;
433+
cursor: pointer;
434+
padding: 15px;
435+
border-radius: 4px;
436+
}
437+
438+
#myBtn:hover {
439+
background-color: #555;
419440
}

0 commit comments

Comments
 (0)