[ACCEPTED]-Display a fixed "ToolTip" when an input receives focus, using jQuery-jquery

Accepted answer
Score: 13

You could create your tooltip manually in 6 an element hidden with display:none which would be shown 5 in a focus event handler.

$("input[id$=tbMyTextbox]").focus(function() {
   $("div[id$=tooltip]").show();
});

$("input[id$=tbMyTextbox]").blur(function() {
   $("div[id$=tooltip]").hide();
});

Another possibility 4 might be using the show option in qTip. I've 3 never used qTip, so this is purely theoretical 2 on my end, but you should be able to specify 1 show: { when: { event: 'focus' } } in the options.

http://craigsworks.com/projects/qtip/docs/reference/#show

Score: 3
$(function() {
    $("input[id$=tbMyTextbox]").qtip({
        content: 'My Tooltip Text',
        show: 'focus',
        hide: 'blur'
    });
});

0

More Related questions