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

Commit

Permalink
Make returning false/null/undefined in content.title funtction remove…
Browse files Browse the repository at this point in the history
… the title
  • Loading branch information
Craga89 committed Feb 21, 2012
1 parent a0390be commit 7862f79
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 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: Tue Feb 21 04:23:23 2012 +0000
* Date: Tue Feb 21 04:31:31 2012 +0000
*/

/*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true */
Expand Down Expand Up @@ -325,8 +325,8 @@ function QTip(target, options, id, attr)
content = content.call(target, cache.event, self);
}

// Remove title if callback returns false
if(content === FALSE) { return removeTitle(FALSE); }
// Remove title if callback returns false or null/undefined (but not '')
if(content === FALSE || (!content && content !== '')) { return removeTitle(FALSE); }

// Append new content if its a DOM array and show it if hidden
else if(content.jquery && content.length > 0) {
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: Tue Feb 21 04:23:23 2012 +0000
* Date: Tue Feb 21 04:31:31 2012 +0000
*/

/* Core qTip styles */
Expand Down
6 changes: 3 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 21 04:23:23 2012 +0000
* Date: Tue Feb 21 04:31:31 2012 +0000
*/

/*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true */
Expand Down Expand Up @@ -325,8 +325,8 @@ function QTip(target, options, id, attr)
content = content.call(target, cache.event, self);
}

// Remove title if callback returns false
if(content === FALSE) { return removeTitle(FALSE); }
// Remove title if callback returns false or null/undefined (but not '')
if(content === FALSE || (!content && content !== '')) { return removeTitle(FALSE); }

// Append new content if its a DOM array and show it if hidden
else if(content.jquery && content.length > 0) {
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 src/core.js
Expand Up @@ -262,8 +262,8 @@ function QTip(target, options, id, attr)
content = content.call(target, cache.event, self);
}

// Remove title if callback returns false
if(content === FALSE) { return removeTitle(FALSE); }
// Remove title if callback returns false or null/undefined (but not '')
if(content === FALSE || (!content && content !== '')) { return removeTitle(FALSE); }

// Append new content if its a DOM array and show it if hidden
else if(content.jquery && content.length > 0) {
Expand Down

0 comments on commit 7862f79

Please sign in to comment.