php - javascript for scrollTo -


i have script :

$(document).ready(function() {           $('a.link').click(function () {               $('#wrapper').scrollto($(this).attr('href'), 400);             $('a.link').removeclass('selected');               $(this).addclass('selected');             return false;           });       });     function setposition(check, div, p1, p2, p3, p4, p5) {     if(check==='#box1')         {             $(div).scrollto(p1, 400);         }     else if(check==='#box2')         {             $(div).scrollto(p2, 400);         }     else if(check==='#box3')         {             $(div).scrollto(p3, 400);         }     else if(check==='#box4')         {             $(div).scrollto(p4, 400);         }     else         {             $(div).scrollto(p5, 400);         }     }; 

but box4and box 5, thats won't slide left . slide bottom of box1 . layout :

_____________________________________________________________________ |              |                 |                 |                | |              |                 |                 |                | |     box1     |      box2       |       box3      |      box4      | |              |                 |                 |                |  |______________|_________________|_________________|________________| |              |                 |                 |                | |              |                 |                 |                | |    box5      |      box6       |      box7       |      box8      | |              |                 |                 |                | |______________|_________________|_________________|________________| 

i wont page stright right not go down . anysugest ? how can change ? thank advice or suggest.

is looking for? http://jsfiddle.net/6cmjz/ (notice scrollbar on bottom)

simply set width wrapper.

#wrapper{    width: 1000px; } 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -