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

Commit

Permalink
Optimize optimize optimize...
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed Jan 19, 2011
1 parent ec56527 commit 7e6eb50
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 60 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: Wed Jan 19 14:31:31 2011 +0000
* Date: Wed Jan 19 14:45:32 2011 +0000
*/

/* Fluid class for determining actual width in IE */
Expand Down
17 changes: 6 additions & 11 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: Wed Jan 19 14:31:31 2011 +0000
* Date: Wed Jan 19 14:45:32 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 @@ -1275,7 +1275,7 @@ function QTip(target, options, id, attr)
// Initialization method
function init(id, opts)
{
var obj, posOptions, attr, usedAttr,
var obj, posOptions, attr,

// Setup element references
elem = $(this),
Expand All @@ -1299,18 +1299,13 @@ function init(id, opts)

// Setup missing content if none is detected
if('boolean' === typeof config.content.text) {
var attr = $.attr(this, config.content.attr);
attr = $.attr(this, config.content.attr);

// Grab from supplied attribute if available
if(config.content.attr !== FALSE && attr) {
config.content.text = attr;
usedAttr = config.content.attr;
}
if(config.content.attr !== FALSE && attr) { config.content.text = attr; }

// No valid content was found, abort render
else {
return FALSE;
}
else { return FALSE; }
}

// Setup target options
Expand Down Expand Up @@ -1341,7 +1336,7 @@ function init(id, opts)
}

// Initialize the tooltip and add API reference
obj = new QTip(elem, config, id, usedAttr);
obj = new QTip(elem, config, id, !!attr);
$.data(this, 'qtip', obj);

// Catch remove events on target element to destroy redundant tooltip
Expand Down

0 comments on commit 7e6eb50

Please sign in to comment.