1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-03 06:55:03 +03:00

Fix tooltips

This commit is contained in:
Denis Shakhov 2013-04-12 12:57:39 +07:00
parent d605f258e6
commit 99d7ae36e5
2 changed files with 17 additions and 2 deletions

View file

@ -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 {

View file

@ -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;
},
}
});