-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sobre (js) (3).
38 lines (38 loc) · 1.02 KB
/
Sobre (js) (3).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
(function( $, undefined ) {
var uiTooltip = $.ui.tooltip;
$.widget( "ui.tooltip", $.ui.tooltip, {
options: {
content: function() {
return $( this ).attr( "title" );
},
position: {
my: "left top",
at: "left bottom",
offset: "5 10"
},
show: {
delay: 0
},
hide: {
delay: 0
},
tooltipClass: null
},
_create: function() {
var that = this;
this.element.attr( "role", "tooltip" );
this.tooltip = this._tooltip( this.element );
this.liveRegion = $( "<div>" ).attr( "id", this.element.attr( "id" ) + "-live" ).addClass( "ui-tooltip-live" ).appendTo( this.document[ 0 ].body );
this._on( this.element, {
mouseenter: function( event ) {
var tooltipData = that._find( event.target );
if ( !tooltipData ) {
tooltipData = that._tooltip( event.target );
}
that._open( event, tooltipData );
},
mouseleave: function( event ) {
var tooltipData = that._find( event.target );
if ( tooltipData ) {
that._close( event, tooltipData );
}