Skip to content

Instantly share code, notes, and snippets.

@apipkin
Created September 20, 2010 21:55
Show Gist options
  • Save apipkin/588718 to your computer and use it in GitHub Desktop.
Save apipkin/588718 to your computer and use it in GitHub Desktop.
// input :: <hr/>
Y.all('hr').each(function(hr){
var div = Y.Node.create('<div class="hr"/>');
Y.Node.insertBefore(div, hr);
div.append(hr.remove());
});
// output :: <div class="hr"><hr/></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment