app/soc/content/js/tips-081027.js
changeset 2295 8566fb2b8012
parent 2294 be2c150d1a1f
child 2296 ebc4931f0762
equal deleted inserted replaced
2294:be2c150d1a1f 2295:8566fb2b8012
     1 $(function() {
       
     2   // Change 'title' to something else first
       
     3   $('tr[title]').each(function() {
       
     4     $(this).attr('xtitle', $(this).attr('title')).removeAttr('title');
       
     5   })
       
     6     .children().children(':input')
       
     7       // Set up event handlers
       
     8       .bt({trigger: ['helperon', 'helperoff'],
       
     9              titleSelector: "parent().parent().attr('xtitle')",
       
    10              killTitle: false,
       
    11              fill: 'rgba(135, 206, 250, .9)',
       
    12              positions: ['bottom', 'top', 'right']
       
    13           })
       
    14       .bind('focus', function() {
       
    15                 $(this).trigger('helperon');
       
    16               })
       
    17       .bind('blur', function() {
       
    18                 $(this).trigger('helperoff');
       
    19               })
       
    20     .parent()
       
    21       .bind('mouseover', function() {
       
    22                 $(this).children(':input').trigger('helperon');
       
    23               })
       
    24       .bind('mouseleave', function() {
       
    25                 $(this).children(':input').trigger('helperoff');
       
    26               });
       
    27 });
       
    28