Carousel
hamishwillee
(Talk | contribs) m (Automated change of category from Web Runtime (WRT) to Symbian Web Runtime) |
hamishwillee
(Talk | contribs) m (Hamishwillee - Fix categories) |
||
| Line 1: | Line 1: | ||
| − | [[Category: | + | [[Category:Guarana UI]] |
__NOTOC__ | __NOTOC__ | ||
=Inheritance= | =Inheritance= | ||
Revision as of 06:34, 5 July 2012
Inheritance
Nokia.Carousel
|- Nokia.Widget
|- Nokia.Class (basic class)
1 - Description
The Carousel component's icon is fixed in horizontal position, and each element within it is a link. If the carousel contains so many elements that they do not fit on the screen, an arrow sign to indicate this must be shown over the first or last element.
2 - Visual Design
3 - Component Dependencies
3.1 CSS
<!-- Themeroller CSS --> <link rel="stylesheet" href="themes/themeroller/<theme>/Themeroller.css" type="text/css" media="screen"> <!-- Specific Theme/Resolution CSS --> <link rel="stylesheet" href="/themes/nokia/ext-theme/<theme>/<resolution>/custom.css" type="text/css" media="screen">
3.2 Javascript
<!-- jQuery file --> <script src="/lib/jquery/jQuery.js" type="text/javascript" charset="utf-8"></script> <!-- Guarana file --> <script src="/lib/Guarana.js" type="text/javascript" charset="utf-8"></script>
4 - Functional Specifications/Requirements
4.1 - Options
- element: 'selector'
- jQuery selector or the DOM reference to become the container of the component.
- items: Object[]
- Defines the list of elements in the component.
- visibleItems: int
- Defines the number of visible elements.
- backgroundClass: string
- Defines the CSS class of the component background.
- options.itemDimensions.width: int
- Defines the component width.
- options.itemDimensions.height
- Defines the component height.
- applyTransition: boolean
- Defines whether a transition effect will be applied in component interaction.
- delay: int
- Defines the delay time used in the transition effect.
4.2 - Events - Callbacks
- create: function()
- Scope: [this.element]
- prev: function(event)
- Scope: [this.element]
- next: function(event)
- Scope: [this.element]
4.3 - Methods
- roll: function(increment, time)
- Applies roll in the component. The roll direction is defined by increment. The delay applied in animation is defined by time.
- return [void]
4.4 - Default options
- items: '> li',
- backgroundClass: 'ui-state-default',
- visibleItems: 5,
- applyTransition: false,
- delay: 1000,
- itemDimensions: { height: 75, width: 75}
- select: function(event, item) {}
5 - Component Demo
5.1 HTML
<ul id="carousel1">
<li><img src="images/icon1.png"/></li>
<li><img src="images/icon2.png"/></li>
<li><img src="images/icon3.png"/></li>
<li><img src="images/icon4.png"/></li>
<li><img src="images/icon5.png"/></li>
<li><img src="images/icon6.png"/></li>
<li><img src="images/icon7.png"/></li>
<li><img src="images/icon8.png"/></li>
<li><img src="images/icon9.png"/></li>
<li><img src="images/icon10.png"/></li>
</ul>
5.2 Javascript
window.carousel1 = new Nokia.Carousel({
element: '#carousel1',
visibleItems: 4,
width: 400,
delay: 150,
create: function() {
//alert("Carousel: Create");
},
select: function(event, item) {
//alert("Carousel: Select", event);
},
next: function(event) {
//alert("Carousel: Next", event);
},
prev: function(event) {
//alert("Carousel: Prev", event);
}
});
6 - Nokia WRT Browser Compatibility
| ▴ | S60 3.1 | S60 3.2 | S60 5.0 |
| Carousel | NO | YES | YES |


