This fixes hiding of non-wrapped TextNodes using jQuery 1.10+, which may be issue #16
.contents(':not("any-old-filter")') in jQuery > 1.9 happens to also filter out all non-wrapped TextNodes, while contents() and children() without filters specified leave all of them in. That caused the old $detailsNotSummaryContents to exclude the nodes that still needed <span> wrapping to hide properly.
This fixes hiding of non-wrapped
TextNode
s using jQuery 1.10+, which may be issue #16.contents(':not("any-old-filter")')
in jQuery > 1.9 happens to also filter out all non-wrappedTextNode
s, whilecontents()
andchildren()
without filters specified leave all of them in. That caused the old$detailsNotSummaryContents
to exclude the nodes that still needed<span>
wrapping to hide properly.jQ 1.9 (leaves in unwrapped nodes): http://codepen.io/anon/pen/MwQmVb jQ 1.10 (filters out unwrapped nodes): http://codepen.io/anon/pen/YXeVLJ