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

Commit

Permalink
Reimplemented apiHash method to be static i.e. changes occur to actua…
Browse files Browse the repository at this point in the history
…l API objects, not a copy
  • Loading branch information
Craga89 committed Dec 12, 2010
1 parent 326b569 commit bb42c6c
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 79 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: Sun Dec 12 02:03:02 2010 +0000
* Date: Sun Dec 12 02:09:30 2010 +0000
*/

.ui-tooltip-accessible{
Expand Down
21 changes: 13 additions & 8 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 Dec 12 02:03:02 2010 +0000
* Date: Sun Dec 12 02:09:30 2010 +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 @@ -1208,13 +1208,18 @@ function QTip(target, options, id)

hash: function()
{
var apiHash = $.extend({}, self);
delete apiHash.cache;
delete apiHash.timers;
delete apiHash.options;
delete apiHash.plugins;
delete apiHash.render;
delete apiHash.hash;
var apiHash = {};

$.each([
// Properties
'id', 'rendered', 'elements', 'timers',
// Methods
'get', 'set', 'toggle', 'show', 'hide', 'focus',
'reposition', 'redraw', 'disable', 'destroy'
],
function(i, name){
apiHash[name] = self[name];
});

return apiHash;
}
Expand Down

0 comments on commit bb42c6c

Please sign in to comment.