Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Tooltip

From Wiki
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 

 

This page was last modified on 31 July 2012, at 11:35.
76 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.

×