/    Sign up×
Community /Pin to ProfileBookmark

Help using image scrollbars<custom scrollbars

Hey i just checked out this script that uses image as scrollbars and its really cool but it stacks both the image at the bottom of the page is there anyway i can put the first image on top and 2nd image at the bottom of the page here is the script

[code=php]<div id=”staticbuttons” style=”position:absolute;”>
<a href=”javascript:” onmouseover=”myspeed=-thespeed” onmouseout=”myspeed=0″><img
src=”images/arrows_up.gif” border=”0″></a><br>
<a href=”javascript:” onmouseover=”myspeed=thespeed” onmouseout=”myspeed=0″><img
src=”images/arrows_dn.gif” border=”0″></a>
</div>

<script>

//Page Scroller (aka custom scrollbar)- By Dynamic Drive
//For full source code and more DHTML scripts, visit [url]http://www.dynamicdrive.com[/url]
//This credit MUST stay intact for use

var Hoffset=90 //Enter buttons’ offset from right edge of window (adjust depending on images width)
var Voffset=90 //Enter buttons’ offset from bottom edge of window (adjust depending on images height)
var thespeed=6 //Enter scroll speed in integer (Advised: 1-3)

var ieNOTopera=document.all&&navigator.userAgent.indexOf(“Opera”)==-1
var myspeed=0

var ieHoffset_extra=document.all? 15 : 0
var cross_obj=document.all? document.all.staticbuttons : document.getElementById? document.getElementById(“staticbuttons”) : document.staticbuttons

function iecompattest(){
return (document.compatMode && document.compatMode!=”BackCompat”)? document.documentElement : document.body
}

function positionit(){
var dsocleft=document.all? iecompattest().scrollLeft : pageXOffset
var dsoctop=document.all? iecompattest().scrollTop : pageYOffset
var window_width=ieNOTopera? iecompattest().clientWidth+ieHoffset_extra : window.innerWidth+ieHoffset_extra
var window_height=ieNOTopera? iecompattest().clientHeight : window.innerHeight

if (document.all||document.getElementById){
cross_obj.style.left=parseInt(dsocleft)+parseInt(window_width)-Hoffset+”px”
cross_obj.style.top=dsoctop+parseInt(window_height)-Voffset+”px”
}
else if (document.layers){
cross_obj.left=dsocleft+window_width-Hoffset
cross_obj.top=dsoctop+window_height-Voffset
}
}

function scrollwindow(){
window.scrollBy(0,myspeed)
}

function initializeIT(){
positionit()
if (myspeed!=0){
scrollwindow()
}
}

if (document.all||document.getElementById||document.layers)
setInterval(“initializeIT()”,20)

</script>[/code]

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @notorius spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...