mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-05 07:54:24 +03:00
Fix tooltips
This commit is contained in:
parent
d605f258e6
commit
99d7ae36e5
|
@ -97,7 +97,9 @@ var ls = ls || {};
|
|||
* @type {Object}
|
||||
*/
|
||||
hooks : {
|
||||
onInitTarget: false
|
||||
onInitTarget: false,
|
||||
onEnter: false,
|
||||
onLeave: false
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -168,6 +170,8 @@ var ls = ls || {};
|
|||
|
||||
this.state = 'in';
|
||||
|
||||
if (this.hooks.onEnter) $.proxy(this.hooks.onEnter, this)();
|
||||
|
||||
if ( ! this.options.delay || this.open) {
|
||||
this.show();
|
||||
} else {
|
||||
|
@ -184,6 +188,8 @@ var ls = ls || {};
|
|||
leave: function () {
|
||||
this.state = 'out';
|
||||
|
||||
if (this.hooks.onLeave) $.proxy(this.hooks.onLeave, this)();
|
||||
|
||||
if ( ! this.options.delay || ! this.timeout ) {
|
||||
this.hide();
|
||||
} else {
|
||||
|
|
|
@ -27,7 +27,16 @@ var ls = ls || {};
|
|||
|
||||
this.setContent(this.options.content);
|
||||
}
|
||||
},
|
||||
|
||||
onEnter: function () {
|
||||
var title = this.$toggle.attr('title');
|
||||
if (title) {
|
||||
this.options.content = title;
|
||||
this.$toggle.removeAttr('title');
|
||||
}
|
||||
//this.$toggle;
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue