jQuery's replaceAll does not recognize an element that closes itself, e.g. "<div />".

This page must be reloaded between tests.

Test 1 should replace the second "Static Text" with the text "Replacement". Should pass.

Test 2 should place the text "Replacement" before the first "Static Text". Should fail.




Static Text
Static Text