Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

Commit

Permalink
show.solo now allows you to specify a context in which to look for to…
Browse files Browse the repository at this point in the history
…oltips i.e. show: { solo: $('.containerWithTooltipsToHide') }
  • Loading branch information
Craga89 committed Feb 17, 2011
1 parent 418be2a commit e2906c7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dist/jquery.qtip.css
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Tue Feb 15 21:05:28 2011 +0000
* Date: Wed Feb 16 20:19:44 2011 +0000
*/

/* Fluid class for determining actual width in IE */
Expand Down
7 changes: 4 additions & 3 deletions dist/jquery.qtip.js
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Tue Feb 15 21:05:28 2011 +0000
* Date: Wed Feb 16 20:19:44 2011 +0000
*/

"use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
Expand Down Expand Up @@ -884,8 +884,8 @@ function QTip(target, options, id, attr)
// Update tooltip position (without animation)
self.reposition(event, 0);

// Hide other tooltips if tooltip is solo
if(opts.solo) { $(selector).not(tooltip).qtip('hide', callback); }
// Hide other tooltips if tooltip is solo, using it as the context
if(opts.solo) { $(selector, opts.solo).not(tooltip).qtip('hide', callback); }
}
else {
// Clear show timer if we're hiding
Expand Down Expand Up @@ -1332,6 +1332,7 @@ function init(id, opts)
if(posOptions.container === FALSE) { posOptions.container = docBody; }
if(posOptions.target === FALSE) { posOptions.target = newTarget; }
if(config.show.target === FALSE) { config.show.target = newTarget; }
if(config.show.solo === TRUE) { config.show.solo = docBody; }
if(config.hide.target === FALSE) { config.hide.target = newTarget; }
if(config.position.viewport === TRUE) { config.position.viewport = posOptions.container; }

Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.qtip.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/jquery.qtip.pack.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/core.js
Expand Up @@ -842,8 +842,8 @@ function QTip(target, options, id, attr)
// Update tooltip position (without animation)
self.reposition(event, 0);

// Hide other tooltips if tooltip is solo
if(opts.solo) { $(selector).not(tooltip).qtip('hide', callback); }
// Hide other tooltips if tooltip is solo, using it as the context
if(opts.solo) { $(selector, opts.solo).not(tooltip).qtip('hide', callback); }
}
else {
// Clear show timer if we're hiding
Expand Down Expand Up @@ -1290,6 +1290,7 @@ function init(id, opts)
if(posOptions.container === FALSE) { posOptions.container = docBody; }
if(posOptions.target === FALSE) { posOptions.target = newTarget; }
if(config.show.target === FALSE) { config.show.target = newTarget; }
if(config.show.solo === TRUE) { config.show.solo = docBody; }
if(config.hide.target === FALSE) { config.hide.target = newTarget; }
if(config.position.viewport === TRUE) { config.position.viewport = posOptions.container; }

Expand Down

0 comments on commit e2906c7

Please sign in to comment.