Is there a way to add a vertical line between two empty elements in HTML without affecting the layout or interrupting the content? The line should be positioned to the left of the text and should span across multiple paragraphs regardless of the hierarchy of the elements. Any suggestions on how to achieve this using jQuery or JavaScript?
Here is a sample of the HTML code that illustrates the issue:
<div>
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr,<br /> sed diam nonumy eirmod
tempor invidunt ut labore<span id="start_line-1"/> et dolore magna aliquyam
erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
Stet clita kasd gubergren, no sea takimata sanctus est<br /> Lorem ipsum dolor sit
amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
no sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr,<br /> sed diam nonumy eirmod
tempor invidunt ut labore<span id="end_line-1"/> et dolore magna aliquyam
erat, sed diam voluptua.
</p>
<span id="start_line-2"/>
<span>At vero eos et accusam et justo duo dolores et ea rebum. Stet<br /> clita kasd
gubergren, no sea takimata sanctus est<br /> Lorem ipsum dolor sit amet.</span>
<span id="end_line-2"/>
</div>