scroll bar customization

This commit is contained in:
hugo LAMY
2025-03-02 01:59:30 +01:00
parent 78d8a1bdff
commit a99f49693d
4 changed files with 63 additions and 245 deletions

View File

@@ -28,66 +28,6 @@
/>
<script type="text/javascript" src="javascript/tools.js"></script>
<script type="text/javascript" src="javascript/jsScrollbar.js"></script>
<script type="text/javascript" src="javascript/jsScroller.js"></script>
<script type="text/javascript">
<!--
var scroller = null;
var scrollbar = null;
window.onload = function () {
scroller = new jsScroller(document.getElementById("News"), 480, 530);
scrollbar = new jsScrollbar(
document.getElementById("Scrollbar-Container"),
scroller,
true,
scrollbarEvent
);
};
function scrollbarEvent(o, type) {
if (type == "mousedown") {
if (o.className == "Scrollbar-Track")
o.style.backgroundColor = "#E3E3E3";
else o.style.backgroundColor = "##CC3300";
} else {
if (o.className == "Scrollbar-Track")
o.style.backgroundColor = "#EEE";
else o.style.backgroundColor = "#CC3300";
}
}
function swapIt(o) {
o.blur();
if (o.className == "current") return false;
var list = document
.getElementById("Navigation")
.getElementsByTagName("a");
for (var i = 0; i < list.length; i++) {
if (list[i].className == "current") {
list[i].className = "";
document.getElementById(list[i].title).y = -scroller._y;
}
if (list[i].title == o.title) o.className = "current";
}
list = document.getElementById("Container").childNodes;
for (var i = 0; i < list.length; i++) {
if (list[i].tagName == "DIV") list[i].style.display = "none";
}
var top = document.getElementById(o.title);
top.style.display = "block";
scrollbar.swapContent(top);
if (top.y) scrollbar.scrollTo(0, top.y);
return false;
}
-->
</script>
<script type="text/javascript">
<!--
function preload() {
@@ -358,14 +298,7 @@
<!-- fin container -->
</div>
<div id="Scrollbar-Container">
<div class="Scrollbar-Up"></div>
<div class="Scrollbar-Down"></div>
<div class="Scrollbar-Track">
<div class="Scrollbar-Handle"></div>
</div>
</div>
<!-- fin ateliers -->
</div>