Lets say I have some html like this:
FoohiddenBar
In
create a clone, add it to the DOM (as pointed out by slindberg), remove all hidden elements, and then get the text :
var clone = $('#content').clone(); clone.appendTo('body').find(':hidden').remove(); var text = clone.text(); clone.remove();
FIDDLE