app/soc/content/js/tips-081027.js
author Lennard de Rijk <ljvderijk@gmail.com>
Tue, 17 Feb 2009 21:16:35 +0000 (2009-02-17)
changeset 1385 08a2d7a73760
parent 1018 02ffb446da6e
child 2025 e44de18a2f5d
permissions -rw-r--r--
Accidently left one addrole in student.py during my quest to refactor it into params. It has now been removed. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed
$(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');
              });
});