×
Namespaces

Variants
Actions

Tabs Bar

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: User:Kbwiki (06 Nov 2009)
Last edited: hamishwillee (31 Jul 2012)

Contents

Inheritance

Nokia.Tabs
| - Nokia.Widget
|- Nokia.Class (basic class)

1 - Description

The tab bar is fixed in position (vertical or horizontal) and contains a strip of different tab elements. A tab element is always associated with a set of content. Selecting a tab element reveals a corresponding set of content within the primary content area. If more tabs exist than can be shown within the tab window (maximum number to be determined by orientation and UI style. Depends on the text label or image size on each tab), the tab strip extends the system scroll is showed. We suggest the minimum size of 70 px x 60 px for each tab, this way the interaction with the touchable area is comfortable.


2 - Visual Design

Tabsbar01.png

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

  • animation: boolean
    • Defines whether changing between tabs has animation effects.
  • itemWidth: int
    • Defines the Tabs item width in px
  • maximize: boolean
    • Defines whether the component is created as maximised.
  • selected: int
    • Defines the current selected tab index.
  • scrollDelay: int
    • Defines the delay applied in the tabs horizontal scroll.


4.2 - Events - Callbacks

  • create: function()
    • Scope: [this.element]
  • select: function()
    • Scope: [this.element]


4.3 - Methods

  • select: function(tab, event)
    • Selects a specific tab on the component.
    • return [void]

4.4 - Default options

  • animation: false
  • itemWidth: '120px'
  • maximize: true
  • selected: 0
  • scrollDelay: 250


5 - Component Demo

5.1 HTML

<div id="tabs">
     <ul>
          <li><a href="#tab1">Item 1</a></li>
          <li><a href="#tab2">Item 2</a></li>
          <li><a href="#tab3">Item 3</a></li>
          <li><a href="#tab4">Item 4</a></li>
     </ul>

     <div id="tab1">
          <p>Lorem Ipsum Dolor 1</p>
     </div>
     <div id="tab2">
          <p>Lorem Ipsum Dolor 2</p>
     </div>
     <div id="tab3">
          <p>Lorem Ipsum Dolor 3</p>
     </div>
     <div id="tab4">
          <p>Lorem Ipsum Dolor 4</p>
     </div>

</div>


5.2 Javascript

var tabs = new Nokia.Tabs({
     element: '#tabs',
     create: function() {
          //alert('Tabs: Create');
     },
     select: function() {
          //alert('Tabs: Select');
     }
});

6 - Nokia WRT Browser Compatibility

▴   S60 3.1 S60 3.2 S60 5.0
Tabs Bar NO YES  YES 
This page was last modified on 31 July 2012, at 13:50.
48 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×