Before you know how to set the desired type of scrolling, let's remember the parameters which carousel inherits from layout - rows (specifies a list of vertical views) and cols (specifies a list of horizontal views).
Exactly these parameters let us to define the needed type. So, if you'd like to set horizontal scrolling you have to use cols parameter. If you need vertical scrolling you have to use the rows parameter.
Horizontal | Vertical |
---|---|
![]() | ![]() |
{view:"carousel", id:"carousel", cols:[ { template:"<img src='spring.jpg'/>" }, { template:"<img src='summer.jpg'/>" }, { template:"<img src='autumn.jpg'/>" }, { template:"<img src='winter.jpg'/>" } ], panel:{ align:"bottom", size:14 } } | {view:"carousel", id:"carousel", rows:[ { template:"<img src='spring.jpg'/>" }, { template:"<img src='summer.jpg'/>" }, { template:"<img src='autumn.jpg'/>" }, { template:"<img src='winter.jpg'/>" } ], panel:{ align:"bottom", size:14 } } |