app/soc/content/js/tips-081027.js
author Sverre Rabbelier <srabbelier@gmail.com>
Sat, 28 Mar 2009 20:19:18 +0000
changeset 2025 e44de18a2f5d
parent 1018 02ffb446da6e
permissions -rw-r--r--
Remove two trailing comma's IE dies when there is a trailing comma in a js dictionary. Patch by: Sverre Rabbelier

$(function() {
  // 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');
              });
});