I have this:
<p>
<br>
<br>
JQuery problems again...
<br>
<br>
Why me...?
</p>
I tried using this:
$("p").children(":first-child").nextUntil(":not(br)").remove();
But I somehow end up with this:
<p>
JQuery problems again...Why me...?
</p>
To my understanding, do correct me if I'm wrong, the code searches for the first-child of <p>, which would be the first <br>, then deletes all of them that appears before the text.
All I want to do is delete the first <br>s that appear before the text in a <p> element. Can you please tell me how I can do that?