Results 1 to 7 of 7

Thread: smooth moving div II - scrollbar

  1. #1
    Join Date
    May 2007
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default smooth moving div II - scrollbar

    I can get the horizontal scrollbar position by using the following:

    Horizontal Scroll
    window.pageXOffset
    document.documentElement.scrollLeft
    document.body.scrollLeft

    but can I change window scrollbar position?

    This is the followup of http://www.dynamicdrive.com/forums/s...ad.php?t=20684

  2. #2
    Join Date
    Feb 2007
    Location
    England
    Posts
    254
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default

    Yes, This is common and answered in these forums recently. Please search before you ask a question.



    If no luck, post a reply and I will look it up for you.

  3. #3
    Join Date
    Feb 2007
    Location
    England
    Posts
    254
    Thanks
    0
    Thanked 5 Times in 5 Posts

  4. #4
    Join Date
    May 2007
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default forgive me

    Thanks Bob.

    Please forgive my ignorance, I will search for sure next time.

    at the page http://stylefashions.ca/prototype/runway.php, what I tried to do, when click moving left, I want to user to be able to drag the scrollbar to see the leftmost menu if they want.

    when I move the div to left, I want to user to see the mostleft menu.

  5. #5
    Join Date
    May 2007
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I used the John's code and it's working on IE using window.scrollBy.

    Code:
    slidex.doit=function() {
    window.scrollBy(slidex.x*slidex.speed, 0);
    if(slidex.xa>0){
    slidex.xa-=slidex.speed;
    setTimeout("slidex.doit()", slidex.xa<5*slidex.speed? 30 : slidex.xa<10*slidex.speed? 20 : 15);
    }
    else
    slidex.going=0;
    }
    want to make it cross browser.....

  6. #6
    Join Date
    Feb 2007
    Location
    England
    Posts
    254
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default

    Seems to work in FF 2.

    One point I want to make is that you have a 1MB (ONE MEGABYTE) picture on your page. It takes ages to load, even with broadband! Either re-save with a lower quality or make them smaller.

  7. #7
    Join Date
    May 2007
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks, I am gping to make the images small size.

    Is it showing properly in FF? (http://stylefashions.ca/runway1.php)

    I tried in all gecko based browser, the images are pushed down, I got check the css..

    I found css width: 100&#37; sometimes not working , so I just use the actual size (px), and so far so good.
    Last edited by xxlfm; 05-17-2007 at 05:40 PM.

Bookmarks

Posting Permissions

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