Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Update src/javascripts/jquery.tipsy.js #121

Open
wants to merge 1 commit into from

3 participants

@javi-moralesf

In "show" function, I moved up the addition of the property "className", because if we add some width, margin or padding for this custom class, we have to calculate the "tipsy" position after the css new style has been applied.

@javi-moralesf javi-moralesf Update src/javascripts/jquery.tipsy.js
In "show" function, I moved up the addition of the property "className", because if we add some width, margin or padding for this custom class, we have to calculate the "tipsy" position after the css new style has been applied.
493bea0
@CloCkWeRX

I've applied this in 18e68b6

@CloCkWeRX

Duplicate of PR #88

@ADmad

@CloCkWeRX The patch you applied doesn't show up on current master branch HEAD. The class adding is still at old location

@CloCkWeRX

It's on my fork.

@ADmad

Hmm strange, the url of the commit you linked makes it look like its on jaz303's repo https://github.com/jaz303/tipsy/commit/18e68b66b7d4d8d9c823e31b65bbe6c37984e173

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 3, 2012
  1. @javi-moralesf

    Update src/javascripts/jquery.tipsy.js

    javi-moralesf authored
    In "show" function, I moved up the addition of the property "className", because if we add some width, margin or padding for this custom class, we have to calculate the "tipsy" position after the css new style has been applied.
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/javascripts/jquery.tipsy.js
View
7 src/javascripts/jquery.tipsy.js
@@ -33,6 +33,10 @@
$tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity
$tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).prependTo(document.body);
+ if (this.options.className) {
+ $tip.addClass(maybeCall(this.options.className, this.$element[0]));
+ }
+
var pos = $.extend({}, this.$element.offset(), {
width: this.$element[0].offsetWidth,
height: this.$element[0].offsetHeight
@@ -68,9 +72,6 @@
$tip.css(tp).addClass('tipsy-' + gravity);
$tip.find('.tipsy-arrow')[0].className = 'tipsy-arrow tipsy-arrow-' + gravity.charAt(0);
- if (this.options.className) {
- $tip.addClass(maybeCall(this.options.className, this.$element[0]));
- }
if (this.options.fade) {
$tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity});
Something went wrong with that request. Please try again.