jQuery replaceText v1.1


Recently, Paul Irish asked me how I would go about “wrappifying” text on a page with span tags, presumably for some CSS styling.. and he knows that if he mentions something enough, there’s a pretty good chance I’ll make a jQuery plugin for it!

That being said, jQuery replaceText will replace text in specified elements. Note that only text content will be modified, leaving all tags and attributes untouched.

As always, check out the plugin page to find out why you’d want to use this plugin (along with examples and documentation), and let me know what you think!

Post A Comment

  • Any of these HTML tags may be used for style: a, b, i, br, p, strong, em, pre, code.
  • Multi-line JavaScript code should be wrapped in <pre class="brush:js"></pre>
    (supported syntax highlighting brushes: js, css, php, plain, bash, ruby, html, xml)
  • Use &lt; instead of < and &gt; instead of > in the examples themselves.