On Thu, 02 Aug 2007 18:12:02 -0000, Stephan Beal <[EMAIL PROTECTED]> wrote:
> 
> On Aug 2, 7:46 pm, DaveG <[EMAIL PROTECTED]> wrote:
>> What I'd really like is a way to insert dom elements without automatic
> closure taking place. I checked out jQ and didn't see a flag in the code;
> although to be honest I'm not sure I fully understood what's going on in
> there ;)
> 
> The automatic closure is happening due to HOW the functions like
> after() and before() are implemented. When you pass HTML to them, they
> use the browser-supplied DOM functions to create a miniature DOM tree.
> Your BROWSER is what creates the tree and gives jQuery back a well-
> formed DOM tree, which jQuery can than append/prepend/whatever to your
> existing DOM tree. This is, in fact, the only sane way to implement
> the behaviour, as implementing a full-fledged HTML parser into jQ
> would increase its size by several times.

I was not suggesting that the way it's currently handled was wrong. I'd just 
like to be able to optionally not have the tag closed, since I want the closure 
to occur later in the DOM. If I had a means of 'grabbing' the whole block I 
needed, then the auto-closure would be fine in this case, but at this point I 
don't have a way to specify 'grab the dom elements between any header level and 
any other subsequent header level'.

Reply via email to