Namespaces
Variants
Actions
Revision as of 14:35, 31 July 2012 by hamishwillee (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Tooltip

Jump to: navigation, search
Article Metadata

Article
Created: User:Rahulsingh1m (24 Jun 2009)
Last edited: hamishwillee (31 Jul 2012)

Contents

Inheritance

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

1 - Description

A tooltip is a small text label with a solid or semi-transparent colour background and a border that floats above other content. The tooltip should be anchored by the content. The tooltip component is automatically sized to fit the tooltip text.


2 - Visual Design

Tooltip01.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

  • element: 'selector'
    • jQuery selector or the DOM reference to become the container of the component.
  • description: string
    • Description content to be included in the component.
  • zIndex: boolean,
    • Defines the zIndex tooltip property, the order in which tooltips will appear in case of overlap.
  • disabled: boolean
    • Defines whether the component is in disabled mode.
  • roundedCorners: boolean
    • Defines whether the component has rounded corners.
  • around: boolean
    • Defines component internal control.
  • offset: int
    • Defines the offset used by the component.
  • direction: String
    • Defines the direction that the component will appear in.
  • timeout: int
    • Defines the timeout to hide the component.
  • startVisible: boolean
    • Defines whether the component is created in show mode.
  • height: int
    • Defines the component height.
  • width: int
    • Defines the component width.


4.2 - Events - Callbacks

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


4.3 - Methods

  • show: function(event, tooltip)
    • Shows the tooltip.
    • return [void]
  • hide: function()
    • Hides the tooltip.
    • return [void]


4.4 - Default options

  • description: ' - ',
  • timeout: 3000,
  • offset: [0, -15],
  • roundedCorners: true,
  • zIndex: false,
  • direction: 'above center'


5 - Component Demo

5.1 HTML

<a href="#" id="tooltip1">Click Here</a>

5.2 Javascript

var tooltip1 = new Nokia.Tooltip({
     element: '#container',
     description: 'Click here',
     create: function() {
          console.log("Tooltip: create.");
     }
});

6 - Nokia WRT Browser Compatibility

 


▴   S60 3.1 S60 3.2 S60 5.0
Tooltip YES  YES  YES 

 

82 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved