A vertical scrollable
Here we show you a vertical setup for a scrollable. There is a minor change compared to the minimal setup and it's recommended that you study that first before continuing. This scrollable has 4 elements in total and each element has 3 rows that are shown at a time. You can scroll these elements by:
- Clicking on the "more pictures" link.
- Using the up and down arrow keys.
- Using your mousewheel.
1. Barcelona Pavilion
The German Pavilion in Barcelona, designed by Ludwig Mies van der Rohe and built for the International Exposition in 1929.The Pavilion was not only a pioneer for construction forms with a fresh, disciplined understanding of space, but also for modeling new opportunities for an exciting association of free art and architecture.
2. Barcelona Pavilion
The German Pavilion in Barcelona, designed by Ludwig Mies van der Rohe and built for the International Exposition in 1929.The Pavilion was not only a pioneer for construction forms with a fresh, disciplined understanding of space, but also for modeling new opportunities for an exciting association of free art and architecture.
3. Barcelona Pavilion
The German Pavilion in Barcelona, designed by Ludwig Mies van der Rohe and built for the International Exposition in 1929.The Pavilion was not only a pioneer for construction forms with a fresh, disciplined understanding of space, but also for modeling new opportunities for an exciting association of free art and architecture.
4. Barcelona Pavilion
The German Pavilion in Barcelona, designed by Ludwig Mies van der Rohe and built for the International Exposition in 1929.The Pavilion was not only a pioneer for construction forms with a fresh, disciplined understanding of space, but also for modeling new opportunities for an exciting association of free art and architecture.
5. Barcelona Pavilion
The German Pavilion in Barcelona, designed by Ludwig Mies van der Rohe and built for the International Exposition in 1929.The Pavilion was not only a pioneer for construction forms with a fresh, disciplined understanding of space, but also for modeling new opportunities for an exciting association of free art and architecture.
6. Barcelona Pavilion
The German Pavilion in Barcelona, designed by Ludwig Mies van der Rohe and built for the International Exposition in 1929.The Pavilion was not only a pioneer for construction forms with a fresh, disciplined understanding of space, but also for modeling new opportunities for an exciting association of free art and architecture.
7. Barcelona Pavilion
The German Pavilion in Barcelona, designed by Ludwig Mies van der Rohe and built for the International Exposition in 1929.The Pavilion was not only a pioneer for construction forms with a fresh, disciplined understanding of space, but also for modeling new opportunities for an exciting association of free art and architecture.
8. Barcelona Pavilion
The German Pavilion in Barcelona, designed by Ludwig Mies van der Rohe and built for the International Exposition in 1929.The Pavilion was not only a pioneer for construction forms with a fresh, disciplined understanding of space, but also for modeling new opportunities for an exciting association of free art and architecture.
9. Barcelona Pavilion
The German Pavilion in Barcelona, designed by Ludwig Mies van der Rohe and built for the International Exposition in 1929.The Pavilion was not only a pioneer for construction forms with a fresh, disciplined understanding of space, but also for modeling new opportunities for an exciting association of free art and architecture.
10. Barcelona Pavilion
The German Pavilion in Barcelona, designed by Ludwig Mies van der Rohe and built for the International Exposition in 1929.The Pavilion was not only a pioneer for construction forms with a fresh, disciplined understanding of space, but also for modeling new opportunities for an exciting association of free art and architecture.
11. Barcelona Pavilion
The German Pavilion in Barcelona, designed by Ludwig Mies van der Rohe and built for the International Exposition in 1929.The Pavilion was not only a pioneer for construction forms with a fresh, disciplined understanding of space, but also for modeling new opportunities for an exciting association of free art and architecture.
12. Barcelona Pavilion
The German Pavilion in Barcelona, designed by Ludwig Mies van der Rohe and built for the International Exposition in 1929.The Pavilion was not only a pioneer for construction forms with a fresh, disciplined understanding of space, but also for modeling new opportunities for an exciting association of free art and architecture.
HTML code
Our HTML structure is identical to the one presented in the "minimal setup" except that the items that are scrolled are more complex than just a single image. Also, the navigational buttons have been placed inside a wrapping DIV.
CSS code
We have used the following CSS file for the above setup. Here are the crucial parts from the CSS file that are required for a vertical scrollable:
Note: in a horizontal scrollable the items are floating side by side by using the float: left property. In vertical scrollables this is not necessary.
JavaScript code
The scrollable is good at guessing whether its vertical or horizontal by investigating it's width and height. If the height is larger than width then the scrollable is vertical. This can also be manually configured with the vertical property which overrides the automatic determination.
We use the mousewheel configuration to enable scrolling with the mousewheel. You need to make sure that mousewheel tool is included on your page.
Note: this mousewheel tool is not included in the standard jQuery Tools distribution. You must download a custom combination that includes this tool.