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

Commit

Permalink
Fixed .clone() override bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed Mar 30, 2011
1 parent aef4b37 commit 410d48c
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: Mon Mar 28 15:53:34 2011 +0100
* Date: Mon Mar 28 16:03:26 2011 +0100
*/

/* 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: Mon Mar 28 15:53:34 2011 +0100
* Date: Mon Mar 28 16:03:26 2011 +0100
*/

"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 @@ -1584,12 +1584,13 @@ PLUGINS = QTIP.plugins = {

// Clone our element using the real clone method
elem = $.fn['clone'+replaceSuffix].apply(this, arguments)

// Grab all elements with an oldtitle set, and change it to regular title attribute
.filter('[oldtitle]').each(function() {
$.attr(this, title, $.attr(this, oldtitle));
this.removeAttribute(oldtitle);
});
})
.end();

return elem;
},
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 @@ -1542,12 +1542,13 @@ PLUGINS = QTIP.plugins = {

// Clone our element using the real clone method
elem = $.fn['clone'+replaceSuffix].apply(this, arguments)

// Grab all elements with an oldtitle set, and change it to regular title attribute
.filter('[oldtitle]').each(function() {
$.attr(this, title, $.attr(this, oldtitle));
this.removeAttribute(oldtitle);
});
})
.end();

return elem;
},
Expand Down

0 comments on commit 410d48c

Please sign in to comment.