Unwrap <element>::before possible?
The simplified original source looks like
- <div class="foobar">
- :: before
- <div class="toremoveorhide">....</div>
- ...
- </div>
As far as I know it is difficult to manipulate code inside a ::before or ::after section of an element.
However I could imagine that a little workaround could ease this task:
Can I somehow "unwrap" the inner content of the ::before branch? Similar to
$(".foobar::before").content().unwrap();
Maybe there is another way to hide() or remove() the element with class ".tohideorrremove"?
If it is not possible with jQuery maybe there is a way in pure javascript?
Peter