So I have been stumped with this for a while now and can't really seem to get around it. I have some content that is added through a wysiwyg editor. What I want to do is use the <hr>
element to add divs in there to control the look of the container. The problem is that it adds the closing div. I want to add the closing div to the next hr element.
var firstChild = jQuery('.content-container-wrapper hr:first-child');
var lastChild = jQuery('.content-container-wrapper hr:last-child');
if (firstChild) {
jQuery(firstChild).replaceWith('<div class="working">');
};
Is there a way to tell the browser not to add the closing div?
tags? http://jsfiddle.net/xuXB5/ – Barrett Mar 04 '13 at 01:18