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

Commit

Permalink
Use empty() rather than .children().detach(), since it doesn't filter…
Browse files Browse the repository at this point in the history
… out text nodes.
  • Loading branch information
Craga89 committed Oct 31, 2013
1 parent 7e952ed commit dc58f0a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/content.js
Expand Up @@ -26,7 +26,9 @@ PROTOTYPE._update = function(content, element, reposition) {

// Append new content if its a DOM array and show it if hidden
if(content.jquery && content.length > 0) {
element.children().detach().end().append( content.css({ display: 'block', visibility: 'visible' }) );
element.empty().append(
content.css({ display: 'block', visibility: 'visible' })
);
}

// Content is a regular string, insert the new content
Expand Down

0 comments on commit dc58f0a

Please sign in to comment.