# HG changeset patch # User Sverre Rabbelier # Date 1233102827 0 # Node ID 02ffb446da6e250aeab6bd7e83e69bd6c9eedfda # Parent 6ad4fdb4884024f05bd5a42a41767bf94da12c94 Make tooltips work when tabbing Fixed the tooltips on IE, and changed the background colour to be nicer on Firefox. Patch by: Haoyu Bai diff -r 6ad4fdb48840 -r 02ffb446da6e app/soc/content/js/tips-081027.js --- a/app/soc/content/js/tips-081027.js Tue Jan 27 22:59:01 2009 +0000 +++ b/app/soc/content/js/tips-081027.js Wed Jan 28 00:33:47 2009 +0000 @@ -1,3 +1,28 @@ $(function() { - $('tr[title]').bt(); -}); \ No newline at end of file + // Change 'title' to something else first + $('tr[title]').each(function() { + $(this).attr('xtitle', $(this).attr('title')).removeAttr('title'); + }) + .children().children(':input') + // Set up event handlers + .bt({trigger: ['helperon', 'helperoff'], + titleSelector: "parent().parent().attr('xtitle')", + killTitle: false, + fill: 'rgba(135, 206, 250, .9)', + positions: ['bottom', 'top', 'right'], + }) + .bind('focus', function() { + $(this).trigger('helperon'); + }) + .bind('blur', function() { + $(this).trigger('helperoff'); + }) + .parent() + .bind('mouseover', function() { + $(this).children(':input').trigger('helperon'); + }) + .bind('mouseleave', function() { + $(this).children(':input').trigger('helperoff'); + }); +}); +