Skip to content

Commit

Permalink
Monte-carlo simulation page modifed
Browse files Browse the repository at this point in the history
  • Loading branch information
arunp77 committed Aug 15, 2024
1 parent c126d72 commit bc2bf89
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 0 deletions.
45 changes: 45 additions & 0 deletions Monte-carlo-simulations-Basics.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,26 @@
border-bottom: 0 solid transparent;
}

/* Style for the "Back to Top" button */
#myBtn {
display: none;
position: fixed;
bottom: 20px;
right: 30px;
z-index: 99;
font-size: 18px;
border: none;
outline: none;
background-color: red;
color: white;
cursor: pointer;
padding: 15px;
border-radius: 4px;
}

#myBtn:hover {
background-color: #555;
}
/*
* Lumino
*/
Expand Down Expand Up @@ -9534,11 +9554,36 @@ <h2 id="Reference">Reference<a class="anchor-link" href="#Reference">¶</a></h2>

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


<script>
function goBack() {
window.history.back();
}
</script>

<script>
// Get the button
let mybutton = document.getElementById("myBtn");

// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};

function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
mybutton.style.display = "block";
} else {
mybutton.style.display = "none";
}
}

// When the user clicks on the button, scroll to the top of the document
function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>

</body>
</html>
52 changes: 52 additions & 0 deletions market-risk.html
Original file line number Diff line number Diff line change
Expand Up @@ -1374,6 +1374,27 @@
flex: 1 1 auto;
}

/* Style for the "Back to Top" button */
#myBtn {
display: none;
position: fixed;
bottom: 20px;
right: 30px;
z-index: 99;
font-size: 18px;
border: none;
outline: none;
background-color: red;
color: white;
cursor: pointer;
padding: 15px;
border-radius: 4px;
}

#myBtn:hover {
background-color: #555;
}

/*-----------------------------------------------------------------------------
| Copyright (c) Jupyter Development Team.
| Distributed under the terms of the Modified BSD License.
Expand Down Expand Up @@ -7998,5 +8019,36 @@ <h4 id="Consulsion:">Consulsion:<a class="anchor-link" href="#Consulsion:">¶</a
</div>
</div>
</main>
<button class="back-button" onclick="goBack()">Back to Previous Page</button>
<button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>


<script>
function goBack() {
window.history.back();
}
</script>

<script>
// Get the button
let mybutton = document.getElementById("myBtn");

// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};

function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
mybutton.style.display = "block";
} else {
mybutton.style.display = "none";
}
}

// When the user clicks on the button, scroll to the top of the document
function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>
</body>
</html>
21 changes: 21 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -416,4 +416,25 @@ td:first-child {
}
.back-button:hover {
background-color: #0056b3;
}

/* Style for the "Back to Top" button */
#myBtn {
display: none;
position: fixed;
bottom: 20px;
right: 30px;
z-index: 99;
font-size: 18px;
border: none;
outline: none;
background-color: red;
color: white;
cursor: pointer;
padding: 15px;
border-radius: 4px;
}

#myBtn:hover {
background-color: #555;
}

0 comments on commit bc2bf89

Please sign in to comment.