views:

22

answers:

1

I want to use tooltips in my web app running in desktop and mobile touch browsers. To that end, I've written some touch-event code to generate a custom "linger" (pseudo-hover) event for touch. In touch devices, I want to display the tooltip when the user touches an element and lets her finger linger on it for ~500ms, like the tooltip on the iPad's virtual keyboard. When there's a mouse, the hover would trigger the tooltip.

So I'm looking for a minimally invasive tooltip utility. It should not attach itself to events unless specifically instructed to do so. It should do nothing that would interfere with jQuery UI 1.8.2 or DOM event propagation. Nearly all of its intelligence should be devoted to determining where it should be displayed and drawing a connecting wedge between it and the target element, given the twin facts of the target element's location and the size of the htmlContent.

It must let the developer control the show/hide manually and set content manually via a simple API:

    tooltip.show( targetElement, htmlContent, options);
    .
    .
    .
    tooltip.hide( targetElement, options);

Grateful for recommendations. Thanks

+1  A: 

Sencha Touch is what I'm going to be using for my mobile apps.

Sencha Touch is the world's first app framework built specifically to leverage HTML5, CSS3, and Javascript for the highest level of power, flexibility, and optimization. We make specific use of HTML5 to deliver components like audio and video, as well as a localStorage proxy for saving data offline.

It Grunt
To recommend Sencha touch here is like recommending a car that has a nice stereo receiver when the question was "what is a good aftermarket car stereo"? How can an entire application framework be an answer to my question especially when it emphasized "minimally invasive".
Tim
TLDNR... I didn't see that he's already using JQuery. My suggestion was to show that there is an option that are tailored specifically for mobile devices.Since he's on JQuery, I suppose he can use any number of plugins that are already available. A simple google search turned up a list of these 15.http://www.webdesignbooth.com/15-jquery-plugins-to-create-an-user-friendly-tooltip/
It Grunt