|
72 | 72 | });
|
73 | 73 | }
|
74 | 74 |
|
75 |
| - var actualWidth = $tip[0].offsetWidth, |
76 |
| - actualHeight = $tip[0].offsetHeight, |
77 |
| - gravity = maybeCall(this.options.gravity, this.$element[0]); |
| 75 | + var actualWidth = $tip[0].offsetWidth; |
| 76 | + var actualHeight = $tip[0].offsetHeight; |
| 77 | + var gravity = maybeCall(this.options.gravity, this.$element[0]); |
78 | 78 |
|
79 | 79 | var tp;
|
80 | 80 | switch (gravity.charAt(0)) {
|
|
141 | 141 | },
|
142 | 142 |
|
143 | 143 | getTitle: function() {
|
144 |
| - var title, $e = this.$element, o = this.options; |
| 144 | + var title; |
| 145 | + var $e = this.$element; |
| 146 | + var o = this.options; |
145 | 147 | this.fixTitle();
|
146 | 148 | if (typeof o.title == 'string') {
|
147 | 149 | title = $e.attr(o.title == 'title' ? 'original-title' : o.title);
|
|
230 | 232 | if (!options.live) this.each(function() { get(this); });
|
231 | 233 |
|
232 | 234 | if (options.trigger != 'manual') {
|
233 |
| - var eventIn = options.trigger == 'hover' ? 'mouseenter mouseover' : 'focus', |
234 |
| - eventOut = options.trigger == 'hover' ? 'mouseleave mouseout' : 'blur'; |
| 235 | + var eventIn = options.trigger == 'hover' ? 'mouseenter mouseover' : 'focus'; |
| 236 | + var eventOut = options.trigger == 'hover' ? 'mouseleave mouseout' : 'blur'; |
235 | 237 |
|
236 | 238 | if (options.live && options.live !== true) {
|
237 | 239 | $(this).on(eventIn, options.live, enter);
|
|
331 | 333 | */
|
332 | 334 | $.fn.tipsy.autoBounds = function(marginNorth, marginEast, prefer) {
|
333 | 335 | return function() {
|
334 |
| - var dir = {ns: prefer[0], ew: (prefer.length > 1 ? prefer[1] : false)}, |
335 |
| - boundTop = $(document).scrollTop() + marginNorth, |
336 |
| - boundLeft = $(document).scrollLeft() + marginEast, |
337 |
| - $this = $(this); |
| 336 | + var dir = {ns: prefer[0], ew: (prefer.length > 1 ? prefer[1] : false)}; |
| 337 | + var boundTop = $(document).scrollTop() + marginNorth; |
| 338 | + var boundLeft = $(document).scrollLeft() + marginEast; |
| 339 | + var $this = $(this); |
338 | 340 |
|
339 | 341 | if ($this.offset().top < boundTop) dir.ns = 'n';
|
340 | 342 | if ($this.offset().left < boundLeft) dir.ew = 'w';
|
|
354 | 356 | */
|
355 | 357 | $.fn.tipsy.autoBounds2 = function(margin, prefer) {
|
356 | 358 | return function() {
|
357 |
| - var dir = {}, |
358 |
| - boundTop = $(document).scrollTop() + margin, |
359 |
| - boundLeft = $(document).scrollLeft() + margin, |
360 |
| - $this = $(this); |
| 359 | + var dir = {}; |
| 360 | + var boundTop = $(document).scrollTop() + margin; |
| 361 | + var boundLeft = $(document).scrollLeft() + margin; |
| 362 | + var $this = $(this); |
361 | 363 |
|
362 | 364 | // bi-directional string (ne, se, sw, etc...)
|
363 | 365 | if (prefer.length > 1) {
|
|
0 commit comments