Skip to content
Browse files

- typos fix on tooltips. fixed #961

git-svn-id: http://svn.mootools.net/trunk@1529 4db308c1-fb21-0410-9919-de62e267375e
  • Loading branch information...
1 parent 85602eb commit 9a9278b822f3f853b3be8953d41b518d56284a8f kamicane committed Apr 10, 2008
Showing with 6 additions and 4 deletions.
  1. +6 −4 Source/Plugins/Tips.js
View
10 Source/Plugins/Tips.js
@@ -45,11 +45,11 @@ var Tips = new Class({
$$(elements).each(function(element){
var title = element.retrieve('tip:title', element.get('title'));
var text = element.retrieve('tip:text', element.get('rel') || element.get('href'));
- var enter = element.set('tip:enter', this.elementEnter.bindWithEvent(this, element));
- var leave = element.set('tip:leave', this.elementLeave.bindWithEvent(this, element));
+ var enter = element.retrieve('tip:enter', this.elementEnter.bindWithEvent(this, element));
+ var leave = element.retrieve('tip:leave', this.elementLeave.bindWithEvent(this, element));
element.addEvents({mouseenter: enter, mouseleave: leave});
if (!this.options.fixed){
- var move = element.set('tip:move', this.elementMove.bindWithEvent(this, element));
+ var move = element.retrieve('tip:move', this.elementMove.bindWithEvent(this, element));
element.addEvent('mousemove', move);
}
element.store('tip:native', element.get('title'));
@@ -62,7 +62,7 @@ var Tips = new Class({
$$(elements).each(function(element){
element.removeEvent('mouseenter', element.retrieve('tip:enter') || $empty);
element.removeEvent('mouseleave', element.retrieve('tip:leave') || $empty);
- element.removeEvent('mouseleave', element.retrieve('tip:move') || $empty);
+ element.removeEvent('mousemove', element.retrieve('tip:move') || $empty);
element.eliminate('tip:enter').eliminate('tip:leave').eliminate('tip:move');
var original = element.retrieve('tip:native');
if (original) element.set('title', original);
@@ -71,9 +71,11 @@ var Tips = new Class({
},
elementEnter: function(event, element){
+
$A(this.container.childNodes).each(Element.dispose);
var title = element.retrieve('tip:title');
+
if (title){
this.titleElement = new Element('div', {'class': 'tip-title'}).inject(this.container);
this.fill(this.titleElement, title);

0 comments on commit 9a9278b

Please sign in to comment.
Something went wrong with that request. Please try again.