Ben Cherry 2/3/2010

Search/Replace in the DOM with jQuery

Read Original

This article explains a jQuery technique for performing text search and replace operations directly in the Document Object Model (DOM). It provides a specific script to locate and wrap instances of text like '(TODO: something)' with HTML span tags, detailing the logic to target only the deepest containing nodes and avoid selecting parent elements.

Search/Replace in the DOM with jQuery

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week