Index: branches/1.0.x/inc/js/jquery.scripts.js =================================================================== diff -u -N -r15019 -r15043 --- branches/1.0.x/inc/js/jquery.scripts.js (.../jquery.scripts.js) (revision 15019) +++ branches/1.0.x/inc/js/jquery.scripts.js (.../jquery.scripts.js) (revision 15043) @@ -147,6 +147,42 @@ ); } +function create_tooltip($input, $text, $css_class, $remove_function) { + var $tooltip = $input.next('.formStatus'), + $timer = $input.data('timer'); + + clearTimeout($timer); + + if ( $tooltip.length == 1 ) { + $tooltip.hide().remove(); + } + + var $tooltip = $(''); + + $input.after($tooltip); + + if ($remove_function === undefined) { + $remove_function = remove_tooltip; + } + + $tooltip.fadeIn( + 'slow', + function () { + $timer = setTimeout( function() { $remove_function($input); }, 2000); + $input.data('timer', $timer); + } + ); +} + +function remove_tooltip ($input) { + var $tooltip = $input.next('.formStatus'); + + $tooltip.fadeOut('slow', function() { $tooltip.remove(); }); +} + /* === DBlocks class === */ function DBlocks() { var $me = this;