JavaScript
Article
By Sam Deering

jQuery Find and Replace Characters Loop

By Sam Deering

jQuery code snippet to Find and Replace Characters using a loop of every html element in a web page. Change the values in the replace function to suit your needs.

--ADVERTISEMENT--

jQuery('html').each(function(i){ jQuery(this).text(jQuery(this).text().replace('replacetext','withthistext'))})
Recommended
Sponsors
The most important and interesting stories in tech. Straight to your inbox, daily. Get Versioning.
Login or Create Account to Comment
Login Create Account