Plugins

The plugins site is currently in development.

We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.

appendText


Description

This (very) small plugins is the incestuous child of "append" and "text": it appends a new Text Node.

This is especially important when you want to append user-supplied input, because a Text Node is never interpreted as HTML.

Example

var $myLabel = $("<label/>")
    .append("<input type='checkbox'/>")
    .appendText("use HTML <a href=''>");

Will add to the DOM the equivalent of the following HTML:

<label><input type='checkbox'/>use HTML &lt;a href=''&gt;</label>

Downloads



4
Your rating: None Average: 4 (6 votes)