-
Scrollable content II help.
1) Scrollable content II:
2) http://www.dynamicdrive.com/dynamici...crollc2.htm(on DD):
3) Hey guys really great place you have here im happy i found it. Im having a problem with the Scrollable content II i have it all sorted except the arrows dont do anything for me. Ive spent the last 2 hors trying to figure it but i just cant get it you can see it HERE i dunno what else to do to get it going. I would also like to remove the padding on the top border any help would be very welcome below is the code.
[CODE]<div style="text-align: center;">
<script type="text/javascript">
/******************************************
* Scrollable content script II- © Dynamic Drive (www.dynamicdrive.com)
* Visit http://www.dynamicdrive.com/ for full source code
* This notice must stay intact for use
******************************************/
iens6=document.all||document.getElementById
ns4=document.layers
//specify speed of scroll (greater=faster)
var speed=5
if (iens6){
document.write('<div id="container" style="position:relative;width:545px;height:240px;border:2px solid #C40000;overflow:hidden">')
document.write('<div id="content" style="position:absolute;width:545px;left:0;top:0">')
}
</script>
<ilayer name="nscontainer" width=545 height=240 clip="0,0,175,160">
<layer name="nscontent" width=545 height=240 visibility=hidden>
<!--INSERT CONTENT HERE-->
CONTENT REMOVED TO SAVE SPACE!!
<!--END CONTENT-->
</layer>
</ilayer>
<script language="JavaScript1.2">
if (iens6)
document.write('</div></div>')
</script>
<table width="545px"><td><p align="right">
<a href="http://farm4.static.flickr.com/3616/3342696658_0a14bf878a_t.jpg" onMouseover="moveup()" onMouseout="clearTimeout(moveupvar)"><img src="http://farm4.static.flickr.com/3616/3342696658_0a14bf878a_t.jpg" width="15" height="15" alt="UP" border=0></a> <a href="http://farm4.static.flickr.com/3538/3342711738_a76b7d4d12_t.jpg" onMouseover="movedown()" onMouseout="clearTimeout(movedownvar)"><img src="http://farm4.static.flickr.com/3538/3342711738_a76b7d4d12_t.jpg" width="15" height="15" alt="DOWN" border=0></a></p></td>
</table>
<script language="JavaScript1.2">
if (iens6){
var crossobj=document.getElementById? document.getElementById("content") : document.all.content
var contentheight=crossobj.offsetHeight
}
else if (ns4){
var crossobj=document.nscontainer.document.nscontent
var contentheight=crossobj.clip.height
}
function movedown(){
if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100))
crossobj.style.top=parseInt(crossobj.style.top)-speed+"px"
else if (ns4&&crossobj.top>=(contentheight*(-1)+100))
crossobj.top-=speed
movedownvar=setTimeout("movedown()",20)
}
function moveup(){
if (iens6&&parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed+"px"
else if (ns4&&crossobj.top<=0)
crossobj.top+=speed
moveupvar=setTimeout("moveup()",20)
}
function getcontent_height(){
if (iens6)
contentheight=crossobj.offsetHeight
else if (ns4)
document.nscontainer.document.nscontent.visibility="show"
}
window.onload=getcontent_height
</script>
</div>[ICODE]
-
-
Well, atm I can't help with this code. It's very uneffecient, so I'm gonna give you a version I made, thats also not so effecient. I'm in the progress of making a new version of it, but here it is.
Here's the new version.
Currently making it more efficient code, testing it in all browsers, and adding some features onto it people have been asking for
-
-
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks