[Javascript] JS Marquee Scroller Question
Troy III Ajnej
trojani2000 at hotmail.com
Thu Aug 3 11:42:51 CDT 2006
!Reposting::since my reply is delayed/?not delivered!
> I said I did not test it on other > OS's, just Mac.
I totally forgot about that! :')
> It may be acting exactly as it should, but I would like to see image > 1 immediately follow image 9. Any ideas as to how to make that happen?
In that case you should throw away the "marquee" tag
turn to javascript based solution. Seems to me that the proposed Roger Roelofs
and Chris Heilmann approach should work in most browsers even if
heavily CSS dependable: why don't you try it?
------ html ----------
<div id="scroller">
<ul>
<li><img src="images/1.jpg"></li>
<li><img src="images/1.jpg"></li>
<li><img src="images/1.jpg"></li>
...
</ul>
</div>
----- css ----------
#scroller {
height: 84px;
width: 300px;
overflow: hidden
}
#scroller ul {
display: block;
width: 500px
}
#scroller li {
display: inline
}
------- js --------
var marginLeft = 0;
function moveIt() {
var el = document.getElementById("scroller");
el = el.getElementsByTagName("UL")[0];
if (el) {
el.style.marginLeft = marginLeft + "px";
marginLeft -= 10;
if ( marginLeft < -500 ) maraginLeft = 0;
}}
window.onload = function() {
var intervalID = window.setInterval(moveIt, 50);
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Troy III progressive art enterprise~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_________________________________________________________________
Try Live.com - your fast, personalized homepage with all the things you care about in one place.
http://www.live.com/getstarted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20060803/77d92814/attachment.htm>
More information about the Javascript
mailing list