Skip to content

Commit

Permalink
className option now gets applied to outer div and the inner div ha…
Browse files Browse the repository at this point in the history
…s been removed to allow control over z-index as well as the other hard-coded functional CSS props.
  • Loading branch information
richardscarrott committed Jul 2, 2012
1 parent 7f7d772 commit 556310b
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions tooltipsy.source.js
Expand Up @@ -108,7 +108,7 @@
}
return s;
})(base.settings.css) > 0) {
base.$tip.css(base.settings.css);
this.$tipsy.css(base.settings.css);
}
base.width = base.$tipsy.outerWidth();
base.height = base.$tipsy.outerHeight();
Expand Down Expand Up @@ -160,8 +160,8 @@
return;
}

if (e && e.relatedTarget === base.$tip[0]) {
base.$tip.bind('mouseleave', function (e) {
if (e && e.relatedTarget === this.$tipsy[0]) {
this.$tipsy.bind('mouseleave', function (e) {
if (e.relatedTarget === base.$el[0]) {
return;
}
Expand All @@ -174,12 +174,11 @@

$.tooltipsy.prototype.readify = function () {
this.ready = true;
this.$tipsy = $('<div id="tooltipsy' + this.random + '" style="position:absolute;z-index:2147483647;display:none">').appendTo('body');
this.$tip = $('<div class="' + this.settings.className + '">').appendTo(this.$tipsy);
this.$tip.data('rootel', this.$el);
this.$tipsy = $('<div id="tooltipsy' + this.random + '" class="' + this.settings.className + '" style="position:absolute;z-index:2147483647;display:none">').appendTo('body');
this.$tipsy.data('rootel', this.$el);
var e = this.$el;
var t = this.$tip;
this.$tip.html(this.settings.content != '' ? (typeof this.settings.content == 'string' ? this.settings.content : this.settings.content(e, t)) : this.title);
var t = this.$tipsy;
this.$tipsy.html(this.settings.content != '' ? (typeof this.settings.content == 'string' ? this.settings.content : this.settings.content(e, t)) : this.title);
};

$.tooltipsy.prototype.offset = function (el) {
Expand Down Expand Up @@ -223,4 +222,4 @@
});
};

})(jQuery);
})(jQuery);

0 comments on commit 556310b

Please sign in to comment.