Before

before(<selector>, <html>)

Place the the <html> before (as a sibling of) the element selected by <selector>, where <selector> is any valid JQuery Selector.

before("#foo", "<p>This is the text</p>")

See this action in action!

ruleset a60x103 {
  meta {
    name "before example"
    author "Mike Grace"
    description &lt;&lt;
      before action example for documentation
    &gt;&gt;
    logging on
  }
  dispatch {
    domain "docs.kynetx.com"
  }
  rule before_entry_title is active {
    select using "http://docs.kynetx.com/krl/kynetx-rule-language-documentation/actions/before/" setting ()
    before(".entry-title", "
<h1>I got inserted before the <a href="http://api.jquery.com/category/selectors/">jQuery selector</a> .entry-title</h1>
");
  }
}