Skip to content

Commit

Permalink
Redid a53ea80
Browse files Browse the repository at this point in the history
  • Loading branch information
Lennart committed May 20, 2013
1 parent a4c53b6 commit 9eaa917
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/mooimagetip.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,13 @@ var MooImageTip = new Class({
$(item).addEvents({
'mouseenter': function(e) {
var title = $(item).getProperty('title');

var image = $(item).getProperty($this.options.dataSource);
if (!image) return;

if (!title) title = $(item).getProperty('data-title_original');
$(item).setProperty('data-title_original', title);
$(item).setProperty('title', '');

if ($($this.options.tipId)) $($this.options.tipId).destroy();
var tip = new Element('p', {'id': $this.options.tipId});
Expand All @@ -58,6 +63,7 @@ var MooImageTip = new Class({
$this.fireEvent('hide', [$this]);
});
$this.fireEvent('hiding', [$this, tip]);

},
'mousemove': function(e) {
if (!$this.options.follow) return;
Expand Down

0 comments on commit 9eaa917

Please sign in to comment.