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

Commit

Permalink
Returning false in content.title.text function now removes the title …
Browse files Browse the repository at this point in the history
…all together rather than hides it
  • Loading branch information
Craga89 committed Jul 5, 2011
1 parent 4ecfda1 commit 5c951f3
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 10 deletions.
7 changes: 5 additions & 2 deletions dist/jquery.qtip.basic.js
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Sun Jun 26 14:03:44 2011 +0100
* Date: Sun Jun 26 14:07:37 2011 +0100
*/

/*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true */
Expand Down Expand Up @@ -300,8 +300,11 @@ function QTip(target, options, id, attr)
{
var elem = elements.title;

// Remove title if content is FALSE
if(elem && content === FALSE) { removeTitle(); }

// Make sure tooltip is rendered and if not, return
if(!self.rendered || !content) { return FALSE; }
else if(!self.rendered || !content) { return FALSE; }

// Use function to parse content
if($.isFunction(content)) {
Expand Down
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: Sun Jun 26 14:03:44 2011 +0100
* Date: Sun Jun 26 14:07:37 2011 +0100
*/

/* Core qTip styles */
Expand Down
7 changes: 5 additions & 2 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: Sun Jun 26 14:03:44 2011 +0100
* Date: Sun Jun 26 14:07:37 2011 +0100
*/

/*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true */
Expand Down Expand Up @@ -300,8 +300,11 @@ function QTip(target, options, id, attr)
{
var elem = elements.title;

// Remove title if content is FALSE
if(elem && content === FALSE) { removeTitle(); }

// Make sure tooltip is rendered and if not, return
if(!self.rendered || !content) { return FALSE; }
else if(!self.rendered || !content) { return FALSE; }

// Use function to parse content
if($.isFunction(content)) {
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: 4 additions & 1 deletion src/core.js
Expand Up @@ -247,8 +247,11 @@ function QTip(target, options, id, attr)
{
var elem = elements.title;

// Remove title if content is FALSE
if(elem && content === FALSE) { removeTitle(); }

// Make sure tooltip is rendered and if not, return
if(!self.rendered || !content) { return FALSE; }
else if(!self.rendered || !content) { return FALSE; }

// Use function to parse content
if($.isFunction(content)) {
Expand Down

1 comment on commit 5c951f3

@jorrit
Copy link
Contributor

@jorrit jorrit commented on 5c951f3 Jul 11, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the check for false should be after the call to the function.

Please sign in to comment.