app/soc/content/js/tips-081027.js
author Sverre Rabbelier <srabbelier@gmail.com>
Sat, 14 Mar 2009 20:12:56 +0000
changeset 1856 44ccd96a5324
parent 1018 02ffb446da6e
child 2025 e44de18a2f5d
permissions -rw-r--r--
Added a list of developers to the User menu Patch by: Sverre Rabbelier
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
426
114fe0f840c8 Add tooltips style display of help_text, instead of widening the form with
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     1
$(function() {
1018
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
     2
  // Change 'title' to something else first
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
     3
  $('tr[title]').each(function() {
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
     4
    $(this).attr('xtitle', $(this).attr('title')).removeAttr('title');
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
     5
  })
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
     6
    .children().children(':input')
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
     7
      // Set up event handlers
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
     8
      .bt({trigger: ['helperon', 'helperoff'],
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
     9
             titleSelector: "parent().parent().attr('xtitle')",
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    10
             killTitle: false,
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    11
             fill: 'rgba(135, 206, 250, .9)',
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    12
             positions: ['bottom', 'top', 'right'],
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    13
          })
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    14
      .bind('focus', function() {
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    15
                $(this).trigger('helperon');
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    16
              })
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    17
      .bind('blur', function() {
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    18
                $(this).trigger('helperoff');
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    19
              })
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    20
    .parent()
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    21
      .bind('mouseover', function() {
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    22
                $(this).children(':input').trigger('helperon');
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    23
              })
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    24
      .bind('mouseleave', function() {
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    25
                $(this).children(':input').trigger('helperoff');
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    26
              });
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    27
});
02ffb446da6e Make tooltips work when tabbing
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    28