Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to make this in JS?

    Hi, can anyone help me how to do this effect?

    http://www.pavr.cz/2005/america04/048/48.html

    roll the page horizontally to the end and click the "/<<</ zpet" link on the bottom right. the whole page scrolls back.

    it has been done using the Adobe GoLive elements but I am trying to do the same effect in JS while keeping it valid.

    I appreciate any help.

    juan

  • #2
    Regular Coder
    Join Date
    Aug 2005
    Location
    Toronto, ON, Canada
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    onclick="CSAction(new Array(/*CMP*/'scrolling'));return CSClickReturn();
    ...
    CSAct[/*CMP*/ 'scrolling'] = new Array(CSScrollLeft,12000,100);// -->
    ...
    
    	function CSScrollLeft(action){
    		if(navigator.appVersion.charAt(0) >=4) {
    			var container = 0	
    			if (action[2] > 0)		{
    				while (container < action[1]) {
       					window.scrollBy(-action[2],0);
       					container = container + action[2];  
    				} 	
          		}
    		}
    	}

    and for window.scrollBy():
    http://www.mozilla.org/docs/dom/domr...ow_ref106.html
    rm -f /


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •