Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Scrolling content right to left Javascript

Scrolling content right to left Javascript

Problem

I have a page with a horizontal width of 4000px

How would i go about creating an event that starts as soon as the page loads and cycles from the far right to Left of the page? I want to show all the content and get the user back to the start if you get me

Ideally coded in Javascript but will accept CSS3 (if it can be done)

Thanks Guys,

DIM3NSION

Based on your responses i have tried to get this working, but with no avail. Help much appreciated

  
Problem courtesy of: DIM3NSION

Solution

There's probably some errors in this code, since I'm typing it on my phone, but something like this should work. Just stick it in a window.onload function.

function start(){
   window.scrollTo(4000, 0); 
   var x=4000; 

   var t = setInterval(function(){ 
       x-=50; // or whatever 
       if (x
Solution courtesy of: hobberwickey

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

Scrolling content right to left Javascript

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×